QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#469553#6697. CalandarYangHyyyWA 0ms3804kbC++23776b2024-07-09 20:07:092024-07-09 20:07:09

Judging History

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

  • [2024-07-09 20:07:09]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3804kb
  • [2024-07-09 20:07:09]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define int long long
string ss[5]={"Monday","Tuesday","Wednesday","Thursday","Friday"};
signed 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%5+b*30%5+c;
        m+=x*360%5+y*30%5+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;
}

详细

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3804kb

input:

4
2019 5 12 Monday
2019 5 14
2019 5 12 Tuesday
2019 12 30
2019 5 12 Friday
1000000000 1 1
1000000000 1 1 Wednesday
2019 5 12

output:

WednesdayFridayThursdayThursday

result:

wrong answer 1st lines differ - expected: 'Wednesday', found: 'WednesdayFridayThursdayThursday'