1 条题解

  • 0
    @ 2021-04-14 15:48:52

    (题意描述的设置是为了吐槽ICPC英文题面太长读不懂)
    本题是AtCoder上某场比赛的A题。
    本题减小了数据规模,直接判断即可。

    Code:

    #include<bits/stdc++.h>
    using namespace std;
    typedef long long int ll;
    string solve()
    {
        ll n;cin>>n;
        int a=0,b=0;
        for(int i=1;i<=sqrt(n);i++)
        {
            if(n%i!=0)continue;
            if(i%2==1)a++;else b++;
            if(n/i==i)continue;
            if((n/i)%2==1)a++;else b++;
        }
        if(a>b) return "Odd";
        if(a<b) return "Even";
        return "Same";
    }
    int main()
    {
        int t;cin>>t;
        while(t--)cout<<solve()<<endl;
        return 0;
    }
    
  • 1

信息

ID
1232
难度
3
分类
数学 点击显示
标签
递交数
315
已通过
37
通过率
12%
被复制
8
上传者