QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#420272#2826. 历史行程liqingyang#WA 0ms3716kbC++17270b2024-05-24 16:04:222024-05-24 16:04:23

Judging History

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

  • [2024-05-24 16:04:23]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3716kb
  • [2024-05-24 16:04:22]
  • 提交

answer

#include<iostream>
using namespace std;
int n;
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	cin>>n;
	int ans=2;
	for(int i=2018;i>=n;i--)
	{
		ans--;
		ans-=(i%4==0&&(i%100||i%400==0));
	}
	ans=(ans%7+7)%7;
	cout<<7-ans+7<<endl;
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3716kb

input:

1913

output:

11

result:

ok single line: '11'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

1914

output:

10

result:

ok single line: '10'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3520kb

input:

1915

output:

9

result:

ok single line: '9'

Test #4:

score: -100
Wrong Answer
time: 0ms
memory: 3644kb

input:

1916

output:

8

result:

wrong answer 1st lines differ - expected: '14', found: '8'