QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#173889#7180. Forward-Capturing Pawnsucup-team1766#WA 0ms3632kbC++231.3kb2023-09-10 02:31:372023-09-10 02:31:38

Judging History

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

  • [2023-09-10 02:31:38]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3632kb
  • [2023-09-10 02:31:37]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

int main() {
	int y; cin >> y;
	int start = 6;

	for (int i = 2023; i < y; i++) {
		if (i%400 == 0 || i%4==0&&i%100!=0) {
			start = (start+366) % 7;
		} else {
			start = (start+365) % 7;
		}
	}
	for (int i = 2022; i >= y; i--) {
		if (i%400 == 0 || i%4==0&&i%100!=0) {
			start = (start-366) % 7;
		} else {
			start = (start+365) % 7;
		}
		start += 7;
		start %= 7;
	}

	int ans = 0;

	ans += (start + 31 + 6) / 7;
	start = (start + 31) % 7;
	if (y%400 == 0 || y%4==0&&y%100!=0) {
		ans += (start + 29 + 6) / 7;
		start = (start + 29) % 7;
	} else {
		ans += (start + 28 + 6) / 7;
		start = (start + 28) % 7;
	}

	ans += (start + 31 + 6) / 7;
	start = (start + 31) % 7;
	ans += (start + 30 + 6) / 7;
	start = (start + 30) % 7;

	ans += (start + 31 + 6) / 7;
	start = (start + 31) % 7;
	ans += (start + 30 + 6) / 7;
	start = (start + 30) % 7;
	
	//july
	ans += (start + 31 + 6) / 7;
	start = (start + 31) % 7;

	ans += (start + 31 + 6) / 7;
	start = (start + 31) % 7;
	ans += (start + 30 + 6) / 7;
	start = (start + 30) % 7;

	ans += (start + 31 + 6) / 7;
	start = (start + 31) % 7;
	ans += (start + 30 + 6) / 7;
	start = (start + 30) % 7;

	ans += (start + 31 + 6) / 7;
	start = (start + 31) % 7;

	cout << ans << '\n';
}

详细

Test #1:

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

input:

6
a2 d7 e7 w
b6 d7 e7 b
b6 d7 e7 w
b5 a2 b2 w
a6 a2 a4 b
g6 g7 h8 b

output:

63

result:

wrong answer 1st lines differ - expected: 'Draw', found: '63'