View Code of Problem 8

#include<stdio.h>
#include<string.h>
int main()
{
	int n;
	char s[20];
	int le_s;
	scanf("%d",&n);
	int arr[10]={78,71,79,72,72,72,72,72,71,71};
	while(n--)
	{
		getchar();
		scanf("%s",s);
		le_s=strlen(s);
		int x=s[le_s-1]-'0';
		printf("%d\n",365-arr[x]);
		
		
		
	}
	
	
	
	
	return 0;
}

Double click to view unformatted code.


Back to problem 8