• ABBA
  • 咋做呀!

  • @ 2026-9-18 21:21:36

#include<bits/stdc++.h> using namespace std;

int main() { int a, b, c, d; cin >> a >> b; c == 0; d == 0; for (int i; i <= b; i++) { c = a * c;
} for (int i; i <= a; i++) { d = b * d;
}
if (c > d) cout << "first" else if (c < d ) cout << "second" else cout << "same"

return 0;

}


2 条评论

  • @ 2026-9-18 23:38:27

    你们咋都这么强

    • @ 2026-9-18 22:11:00

      实在懒得写循环

      #include <bits/stdc++.h>
      using namespace std;
      signed main() {
      	cin.tie(0)->sync_with_stdio(false);
      	int a,b;cin>>a>>b;
      	long long k=pow(a,b)*1LL;
      	long long kk=1LL*pow(b,a);
      	if(k>kk)cout<<"first";
      	else if(k<kk)cout<<"second";
      	else cout<<"same";
      } 
      
      • 1

      信息

      ID
      1477
      时间
      ms
      内存
      MiB
      难度
      显示难度入门
      标签
      递交数
      130
      已通过
      44
      上传者