ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#220 | #4. 「WyOJ Round 1」启 · 破茧初阳 | recall | Compile Error | / | / | C++23 | 767b | 2025-04-18 14:10:30 | 2025-04-18 18:00:12 |
answer
#include <bits/stdc++.h>
#define int i64
using i64 = long long;
using u64 = unsigned long long;
using u32 = unsigned;
using i128 = __int128;
using u128 = unsigned __int128;
#define lcm(a, b) ((i128) a / std::__gcd(a, b) * b)
inline void solve(){
int a, b, c, n;
std::cin >> n >> a >> b >> c;
int d = lcm(a, b), e = lcm(a, c);
int xx = n / e;
__int128 f = lcm(d, c);
xx = xx - n / f;
// std::cout << n / a - n / d << '\n';
// std::cerr << n / a << ' ' << n / d << ' ' << xx << '\n';
std::cout << n / a - n / d + n / c - xx << '\n';
}
signed main() {
std::ios::sync_with_stdio(0);
std::cin.tie(0), std::cout.tie(0);
int t;
std::cin >> t;
while(t--) solve();
return 0;
}
Details
answer.code:8:14: error: expected type-specifier before '__int128' 8 | using i128 = __int128; | ^~~~~~~~ answer.code:9:22: error: expected ';' before '__int128' 9 | using u128 = unsigned __int128; | ^~~~~~~~~ | ; answer.code: In function 'void solve()': answer.code:11:21: error: 'i128' was not declared in this scope 11 | #define lcm(a, b) ((i128) a / std::__gcd(a, b) * b) | ^~~~ answer.c...