제출 #9497

#제출 시각아이디문제언어결과실행 시간메모리
9497roott76Veni, vidi, vici (kriii2_V)C++98
0 / 4
0 ms1676 KiB
#include <iostream> #include <stdio.h> #include <string.h> using namespace std; int main() { int n; cin >> n; getchar(); char in[100200]; gets(in); int len = strlen(in), bp = 0; in[len] = ' '; in[len+1] = NULL; len++; for(int i=0; i<len; i++) { if(in[i] != ' ') in[i] -= 'a'; } for(int i=0; i<len; i+=2) { if(in[i] == ' ') { i--; cout << " "; } else if(in[i+1] == ' ') cout << " "; else cout << char((in[i]+in[i+1]-n) % 26 + 'a'); } cout << endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...