View Code of Problem 3308

#include<stdio.h>
#include<math.h>
#include<string.h>
//#include<algorithm>
#include <bits/stdc++.h>

char biao[]= {"ABCDEFGHIJKLMNOPQRSTUVWXYZM"};

int main() {
	char str[1000];
	while(1) {
		gets(str);
		if(strcmp(str,"ENDOFINPUT")==0) {
			break;
		}
		gets(str);
		for(int i=0; i<strlen(str); i++) {
			if(str[i]<='Z' && str[i]>='A') {
				printf("%c",biao[(str[i]-'A'+26-5)%26]);
			} else {
				printf("%c",str[i]);
			}
		}
		printf("\n");
		gets(str);
	}
}
/*
F:\temp\22489803.23333\Main.cc:6:25: error: bits/stdc++.h: No such file or directory
*/

Double click to view unformatted code.


Back to problem 3308