Submission #9191

#TimeUsernameProblemLanguageResultExecution timeMemory
9191maniacVeni, vidi, vici (kriii2_V)C++98
4 / 4
0 ms1676 KiB
#include<cstdio> #include<cassert> #include<cstring> #include<map> #include<set> #include<time.h> #include<algorithm> #include<stack> #include<queue> #include<utility> #include<cmath> #include<iostream> #include<string> #include<vector> #include<limits> using namespace std; long long gcd( long long b, long long s ){ return (s!=0) ? gcd( s, b%s ) : b; } char s[105]; int main(){ int n; scanf("%d", &n); bool isStart = 0; while( ~scanf("%s", s) ){ int l = strlen ( s ); if( !isStart ) isStart = 1; else printf(" "); if( l & 1 ) l--; for(int i=0; i<l; i+=2) printf("%c", 'a'+((s[i]-'a') + (s[i+1]-'a') + 26 - n)%26); } puts(""); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...