#include<iostream> #include<cmath> #include<cstdio> #include <string> #include <stdio.h> #include <string.h> using namespace std; int main() { int n,i,t; char p[255]; int a[10]={78,71,79,72,72,72,72,72,71,71} ; scanf("%d",&n); for(i=0;i<n;i++){ gets(a); t=p[strlen(p)-1]-'0'; printf("%d\n",365-a[t]); } return 0; } /* Main.cc: In function 'int main()': Main.cc:15:3: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations] gets(a); ^ Main.cc:15:9: error: cannot convert 'int*' to 'char*' for argument '1' to 'char* gets(char*)' gets(a); ^ */ |
Double click to view unformatted code.