제출 #8407

#제출 시각아이디문제언어결과실행 시간메모리
8407aintaVeni, vidi, vici (kriii2_V)C++98
4 / 4
0 ms1096 KiB
#include<stdio.h>
int n, i, c, ck;
char p[11000];
int main()
{
	scanf("%d", &n);
	gets(p);
	gets(p);
	for (i = 0; p[i]; i++){
		if (p[i] == ' '){
			c = ck = 0;
			printf(" ");
			continue;
		}
		p[i] -= 'a';
		if (ck){
			printf("%c", (c + p[i] - n + 26) % 26 + 'a');
			ck = c = 0;
		}
		else{
			ck = 1, c = p[i];
		}
	}
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...