QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#173889 | #7180. Forward-Capturing Pawns | ucup-team1766# | WA | 0ms | 3632kb | C++23 | 1.3kb | 2023-09-10 02:31:37 | 2023-09-10 02:31:38 |
Judging History
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'