Submission #9736

# Submission time Handle Problem Language Result Execution time Memory
9736 2014-09-28T08:31:25 Z ksmail12 Veni, vidi, vici (kriii2_V) C++
0 / 4
0 ms 1676 KB
#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

int main() {
    int n;
    char buf[11000];
    cin >> n;
    getchar();
    //cin.getline(buf, 11000);
    fgets(buf, 11000, stdin);
    int len = strlen(buf);
    cout << buf <<endl;
    for (int i=0;i<len;i+=2) {
        char a=buf[i],b = buf[i+1];
        if(a==' '){
            printf(" ");
            i++;
            a = buf[i];
            b = buf[i+1];
        }

        if(b!=' ') {
            printf("%c", ((a-'a'+b-'a'-n)%26)+'a');
        }
        else {
            printf(" ");
        }

    }
    cout << endl;

    return 0;
}
# 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 -