#include<stdio.h> #include<string.h> int main() { char a[20]; int len,n; scanf("%d",&n); while(n--) { scanf("%s",a); len=strlen(a); if(a[len-1]=='0') printf("287\n"); if(a[len-1]=='5'||a[len-1]=='3'||a[len-1]=='4'||a[len-1]=='6'||a[len-1]=='7') printf("293\n"); if(a[len-1]=='1'||a[len-1]=='8'||a[len-1]=='9') printf("294\n"); if(a[len-1]=='2') printf("286\n"); } return 0; } |
Double click to view unformatted code.