- 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;
}
6 条评论
-
乔思博 难走的路有个大优点,没人挤,不用堵。 LV 4 @ 2026-10-2 17:38:30i no
-
@ 2026-10-1 16:04:28得加long long不然过不了
-
@ 2026-9-29 18:03:15纯数学可以参考
#include <bits/stdc++.h> #include using namespace std; int main () { double a,b,m,n; cin >> a >> b; m =pow(a,b); n =pow(b,a); if (m>n) cout << "first"; else if (m<n) cout << "second"; else cout << "same"; return 0; }
-
@ 2026-9-23 21:41:42#include<bits/stdc++.h> using namespace std; int main(){ long long a,b,c=1,d=1; cin>>a>>b; for(long long i=1; i<=a; i++){ c*=b; } for(long long i=1; i<=b; i++){ d*=a; } if(d>c){ cout<<"first"; }else if(d<c){ cout<<"second"; }else if(d==c){ cout<<"same"; } }
-
@ 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
- 难度
- 显示难度入门
- 标签
- 递交数
- 166
- 已通过
- 50
- 上传者