Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

imtinanjibon's blog

By imtinanjibon, history, 7 weeks ago, In English,

I am trying to solve a problem in Atcoder using C++ lang. But compiler can not execute my code. But code runs in my pc. How can i fix that?

#include<bits/stdc++.h> using namespace std; int main() { ** int k;** ** string s;** **** ** cin>>k>>s;** ** if(s.size()<=k)** ** {** ** cout<<s<<endl;** ** }** **** ** else** ** {** ** for(int i=k;i<s.size();i++)** ** {** ** s[i]='.';** ** }** **** ** cout<<s<<endl;** ** }** }

 
 
 
 
  • Vote: I like it
  • -24
  • Vote: I do not like it