ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#186 | #4. 「WyOJ Round 1」启 · 破茧初阳 | __vector__ | 0 | 842ms | 3496kb | C++23 | 687b | 2025-04-17 20:39:50 | 2025-04-17 20:39:51 |
answer
#include <bits/stdc++.h>
#define int long long
#define fi first
#define se second
using namespace std;
typedef long long LL;
int lcm(int a, int b) {
return a / __gcd(a, b) * b;
}
void solve() {
int n, a ,b, c;
cin >> n >> a >> b >> c;
if(n=114514)puts("iakioi");
int res = n / a - n / lcm(a, b) + n / c - n / lcm(a, c);
int temp = lcm(lcm(a, b), c);
if (temp % a == 0 && temp % b == 0 && temp % c == 0) res += n / temp, assert(temp >= 0);
cout << res << '\n';
}
signed main() {
cin.tie(0);
cout.tie(0);
ios::sync_with_stdio(0);
int dt;
cin >> dt;
while (dt --)
solve();
return 0;
}
详细
小提示:点击横条可展开更详细的信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3360kb
input:
5 860162 209867 500351 439559 603171 218577 395789 743662 257237 83 83 97 771353 21 25 28 882442 63 ...
output:
0 0 1180 8015 5013 iakioi iakioi iakioi iakioi iakioi
result:
wrong answer 1st numbers differ - expected: '5', found: '0'
Test #2:
score: 0
Wrong Answer
time: 3ms
memory: 3496kb
input:
5 65586 755707 428352 829618 656029 940749 988704 99212 36268 81 74 19 30582 39 65 84 169669 10 30 86
output:
0 1 7348 3628 8787 iakioi iakioi iakioi iakioi iakioi
result:
wrong answer 2nd numbers differ - expected: '6', found: '1'
Test #3:
score: 0
Wrong Answer
time: 1ms
memory: 3436kb
input:
5 1000000 823597 291727 302588 1000000 110582 88125 289933 1000000 56 41 6 1000000 97 68 23 1000000 ...
output:
0 1 20415 6090 3176 iakioi iakioi iakioi iakioi iakioi
result:
wrong answer 1st numbers differ - expected: '4', found: '0'
Test #4:
score: 0
Wrong Answer
time: 4ms
memory: 3448kb
input:
5 1000000 391577 925090 509576 1000000 602666 793626 529237 1000000 34 9 9 1000000 34 31 68 1000000 ...
output:
0 0 15717 3314 4089 iakioi iakioi iakioi iakioi iakioi
result:
wrong answer 1st numbers differ - expected: '3', found: '0'
Test #5:
score: 0
Wrong Answer
time: 141ms
memory: 3368kb
input:
100000 296432115736998358 947322129 486697382 491023976 442633183062920521 378805523 642688939 22691...
output:
iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi ia...
result:
wrong output format Expected integer, but "iakioi" found
Test #6:
score: 0
Wrong Answer
time: 132ms
memory: 3372kb
input:
100000 673374200126361826 331800367 162665250 387080263 144151428834647945 126886572 51580646 287850...
output:
iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi ia...
result:
wrong output format Expected integer, but "iakioi" found
Test #7:
score: 0
Wrong Answer
time: 146ms
memory: 3384kb
input:
100000 534714905018631481 79508556 404238398 161736622 3826684598814001 497377457 854258623 48373266...
output:
iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi ia...
result:
wrong output format Expected integer, but "iakioi" found
Test #8:
score: 0
Wrong Answer
time: 135ms
memory: 3332kb
input:
100000 1000000000000000000 366727583 374716263 685187467 1000000000000000000 877263942 598947447 372...
output:
iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi ia...
result:
wrong output format Expected integer, but "iakioi" found
Test #9:
score: 0
Wrong Answer
time: 143ms
memory: 3336kb
input:
100000 1000000000000000000 979092025 33346302 238829786 1000000000000000000 460728333 175754163 3332...
output:
iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi ia...
result:
wrong output format Expected integer, but "iakioi" found
Test #10:
score: 0
Wrong Answer
time: 137ms
memory: 3384kb
input:
100000 1000000000000000000 437307257 195856865 910658369 1000000000000000000 384087547 596914446 797...
output:
iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi iakioi ia...
result:
wrong output format Expected integer, but "iakioi" found