Submission #9175

#TimeUsernameProblemLanguageResultExecution timeMemory
9175kcm1700Veni, vidi, vici (kriii2_V)C++14
1 / 4
0 ms1088 KiB
#include <cstdio> #include <algorithm> using namespace std; char line[1024]; int main(){ int n; fgets(line, sizeof(line), stdin); sscanf(line,"%d",&n); fgets(line, sizeof(line), stdin); int sm = 0, cn = 0; for(int i = 0; line[i] != '\0'; i++) { if (line[i] == ' ' || line[i] == '\n' || line[i] == '\r') { if (line[i] == '\n' || line[i] == '\r') break; sm = 0; cn = 0; printf("%c", line[i]); } else { sm += line[i]-'a'; cn++; if (cn == 2) { printf("%c", (sm+26-n)%26+'a'); cn = sm = 0; } } } puts(""); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...