Submission #1112176


Source Code Expand

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
using namespace std;
typedef __int64 LL;
typedef vector<int> ivec;
typedef vector<string> svec;

int n;
string s;
int main(){
    cin>>s>>n;
    int m=s.size();	
    for(int i=0;i<m;i++){
    	if('z'-s[i]<n)n-=('z'-s[i])+1,s[i]='a';
	if(i==m-1)s[i]+=n;
	
    }
    cout<<s<<endl;
    return 0;
}

Submission Info

Submission Time
Task C - Next Letter
User sqrt_3
Language C++14 (Clang 3.8.0)
Score 0
Code Size 520 Byte
Status CE

Compile Error

./Main.cpp:13:9: error: unknown type name '__int64'; did you mean '__int64_t'?
typedef __int64 LL;
        ^~~~~~~
        __int64_t
/usr/include/x86_64-linux-gnu/bits/types.h:43:25: note: '__int64_t' declared here
typedef signed long int __int64_t;
                        ^
1 error generated.