Submission #9472

# Submission time Handle Problem Language Result Execution time Memory
9472 2014-09-28T06:39:31 Z httrace Veni, vidi, vici (kriii2_V) C++
0 / 4
0 ms 1676 KB
#include <stdio.h>
#include <iostream>
#include <string>
using namespace std;
int main()
{
	int n;
	int result;
	string a;
	scanf("%d", &n);
	getc(stdin);
	getline(cin, a);
	for(int i = 0 ; i < a.length()+1 ; i+=2){
		if(a.length()-1 < i+1) break;
		if(a[i] == ' '){i++;printf(" ");}
		else if(a[i+1] == ' '){printf(" ");continue;}
		result = a[i] - 97 + a[i+1] -97 - n;
		while(result < 0){result += 26;}
		printf("%c",result%26 + 97);
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 1676 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Halted 0 ms 0 KB -