fork download
  1. #include<iostream>
  2. #include<string>
  3. using namespace std;
  4. int main(){
  5. ios_base::sync_with_stdio(0) ;cin.tie(0) ;cout.tie(0);
  6.  
  7. string str = "codeforce" ;
  8. int n;
  9. cin>>n;
  10. for(int i=0; i<str.size(); i++){
  11. str[i] = tolower(str[i]);
  12. }
  13. if(n!=0 && n<= str.size()){
  14. str[n-1] += 's';
  15. }
  16. for(int i=0;i<n;i++){
  17. str[i] += str[n-1];
  18. }
  19.  
  20. cout<<str<<endl;
  21.  
  22. return 0;
  23. }
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
codeforce