View Code of Problem 8

#include <iostream>
#include <cstdio>
using namespace std;
int main(){
    int t,n;
    cin>>t;
    int d[10]={78,71,79,72,72,72,72,72,71,71};
    while(t--){
        string a;
        cin>>a;
        n=a[a.length()-1]-'0';
        cout<<365-d[n]<<endl;
    }
    return 0;
}


Double click to view unformatted code.


Back to problem 8