@[zhy15353494080](/user/1144722) 开long long
by lpk1118 @ 2024-01-13 15:54:29
@[zhy15353494080](/user/1144722) 每次乘起来都要累加
by SBAAAA0 @ 2024-01-13 16:20:29
@[zhy15353494080](/user/1144722) 不开longlong见祖宗!要养成开longlong的好习惯最后附上我的代码:
```cpp
#include<bits/stdc++.h>
using namespace std;
long long n,x,cnt=1;
int main(){
cin >> x >> n;
while(n--){
cnt+=cnt*x;
}
cout <<cnt;
return 0;
}
```
by LawrenceLoyaldog @ 2024-03-02 19:58:58
@[LawrenceLoyaldog](/user/1042335) 谢谢了
by zhy15353494080 @ 2024-03-02 20:05:55
```cpp
#include<bits/stdc.h>
using namespace std;
int main()
{
long long x,n,sum=1,i;
cin>>x>>n;
for(i=0;i<n;i++)
{
sum=sum+sum*x;
}
cout<<sum;
return 0;
}
```
by zhy15353494080 @ 2024-03-02 20:12:33
@[zhy15353494080](/user/1144722)
by jpb123 @ 2024-03-03 16:18:27
十年OI一场空,不开long long见祖宗
by andycode @ 2024-04-14 18:40:40