Submission #7128606
Source Code Expand
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF 1LL<<62 #define inf 1000000007 int main() { string s; ll k; cin>>s>>k; for(int i=0;i<s.size();i++){ ll now=26-(s[i]-'a'); if(k>=now){ s[i]='a'; k-=now; } } if(k>0){ k%=26; s[s.size()-1]=s[s.size()-1]+k; } cout << s; // your code goes here retu
Submission Info
Submission Time | |
---|---|
Task | C - Next Letter |
User | mototakashi |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 373 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:24:2: error: ‘retu’ was not declared in this scope retu ^ ./Main.cpp:24:2: error: expected ‘}’ at end of input