3 条题解

  • 0
    @ 2026-5-17 14:41:52
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
        long long a, b;
        cin >> a >> b;
        long long s1 = 1, s2 = 1;
        for(int i = 1; i <= a; i++) s1 *= b;
        for(int i = 1; i <= b; i++) s2 *= a;
        cout << s1 + s2;
        return 0;
    }
    • 0
      @ 2026-5-17 14:25:18

      #include<bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; long long y=1,x=1; for(int i=1;i<=a;i++)y*=b; for(int i=1;i<=b;i++)x*=a; cout<<x+y; return 0; }

      • 0
        @ 2026-2-27 15:58:39
        #include<bits/stdc++.h>
        using namespace std;
        #define int long long
        signed main()
        {
        	int a,b;cin>>a>>b;
        	int ans=pow(a,b)+pow(b,a);
        	cout<<ans;
        	return 0;
        }
        • 1

        信息

        ID
        8829
        时间
        2000ms
        内存
        1024MiB
        难度
        2
        标签
        递交数
        33
        已通过
        24
        上传者