2 条题解

  • 1
    @ 2024-4-11 20:47:11

    #include<bits/stdc++.h> using namespace std; int gad(int x,int y) { while(y^=x^=y^=x%=y); return x; } bool solve() { int ans=0; for(int i=1;i<=2020;i++) { for(int j=1;j<=2020;j++) { if(gad(i,j)==1) ans++; } } cout<<ans; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); solve(); return 0; }

    信息

    ID
    997
    时间
    1000ms
    内存
    256MiB
    难度
    2
    标签
    递交数
    69
    已通过
    38
    上传者