QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#469548#6697. CalandarYangHyyyCompile Error//C++23765b2024-07-09 20:05:452024-07-09 20:05:47

Judging History

你现在查看的是最新测评结果

  • [2024-07-09 20:05:47]
  • 评测
  • [2024-07-09 20:05:45]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define int long long
string ss[5]={"Monday","Tuesday","Wednesday","Thursday","Friday"};
int main()
{
	int t;
	cin>>t;
	while(t--)
	{
		int a,b,c,x,y,z;
		string s;
		cin>>a>>b>>c>>s>>x>>y>>z;
        int n=0,m=0;
        n+=a*360+b*30+c;
        m+=x*360+y*30+z;
        int sum=abs(n-m);int xx;
        if(n>=m)
        {
            for(int i=0;i<5;i++)
            {
                if(s==ss[i])
                    xx=((i-sum)%5+5)%5;
            }
            cout<<ss[xx];
        }
        else{
             for(int i=0;i<5;i++)
            {
                if(s==ss[i])
                    xx=(i+sum)%5;
            }
            cout<<ss[xx];
        }
    }	
	return 0;
}

详细

cc1plus: error: ‘::main’ must return ‘int’