QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#325019 | #5602. Sun and Moon | thanhha1210 | WA | 1ms | 3604kb | C++17 | 334b | 2024-02-11 03:11:49 | 2024-02-11 03:11:50 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int main() {
int ds, ys, dm, ym;
cin >> ds >> ys;
cin >> dm >> ym;
// ds * year - ys = ym *year2 - dm
for (int i = 1; i < 5000; i++) {
if ((ys * i - ds + dm) % ym == 0)
cout << ys * i - ds;
break;
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3604kb
input:
3 10 1 2
output:
7
result:
ok single line: '7'
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3528kb
input:
27 32 39 41
output:
result:
wrong answer 1st lines differ - expected: '453', found: ''