QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#469536 | #6697. Calandar | YangHyyy | WA | 1ms | 3832kb | C++23 | 734b | 2024-07-09 20:02:30 | 2024-07-09 20:02:30 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
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-n)%5+5;
}
cout<<ss[xx];
}
else{
for(int i=0;i<5;i++)
{
if(s==ss[i])
xx=(i+n)%5;
}
cout<<ss[xx];
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3832kb
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:
WednesdayThursdayWednesday`\x11
result:
wrong answer 1st lines differ - expected: 'Wednesday', found: 'WednesdayThursdayWednesday`\x11