View Code of Problem 8

#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<vector>
#include<map>
#include<string>
#include<set>
using namespace std;
int main(){
    int ans[10]={78,71,79,72,72,72,72,72,71,71};
	int k;
	cin>>k;
	while(k--){
		string str;
		cin>>str;
		int n=str[str.length()-1]-'0';
		printf("%d\n",365-ans[n]);
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 8