ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#172 | #4. 「WyOJ Round 1」启 · 破茧初阳 | __vector__ | Compile Error | / | / | C++23 | 507b | 2025-04-17 20:11:52 | 2025-04-17 20:11:52 |
answer
#include<iostream>
#define ll long long
#define i128 __int128
using namespace std;
const int N=1e5+10;
i128 gcd(i128 a,i128 b) {return b?gcd(b,a%b):a;}
i128 read() {ll x; cin>>x; return x;}
i128 lcm(i128 a,i128 b) {return a*b/gcd(a,b);}
void sol()
{
ll n=read(),a=read(),b=read(),c=read();
ll res=n/a-n/lcm(a,b)+n/c-(n/lcm(a,c)-n/lcm(lcm(a,b),c));
cout<<res<<'\n';
}
int main()
{
ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
int TT; cin>>TT;
while(TT--) sol();
return 0;
}
详细
answer.code:3:14: error: expected unqualified-id before '__int128' 3 | #define i128 __int128 | ^~~~~~~~ answer.code:6:1: note: in expansion of macro 'i128' 6 | i128 gcd(i128 a,i128 b) {return b?gcd(b,a%b):a;} | ^~~~ answer.code:3:14: error: expected unqualified-id before '__int128' 3 | #define i128 __int128 | ^~~~~~~~ answer.code:7:1: note: in expansion of macro 'i128' 7 | i128 read() {ll x; cin>>x; return x;} | ^~~~ answer.code:3...