View Code of Problem 8

#include<iostream>
#include<cstring>
#include<algorithm>
using namespace std;
int main(){
	int n;
	cin>>n;
	while(n--){
		int num[10]={78,71,79,72,72,72,72,72,71,71};
		char s[100];
		cin>>s;
//		int l=strlen(s);
		int k=s[7]-'0';
		cout<<k<<" "<<num[k]<<endl;
		cout<<365-num[k]<<endl;
}
	return 0;
}

Double click to view unformatted code.


Back to problem 8