救我
2003普及麦森树求改错:
#include
using namespace std;
int x[1000005];
int main(){
x[1]=1;
int y=1,z;
cin>>z;
for(int i=1;i<=z;i++){
for(int j=1;j<=y;j++){
x[j]*=2;
if(x[j-1]>9){
x[j]+1;
x[j-1]-10;
}
}
if(x[y]>9){
y++;
x[y]=1;
x[y-1]-=10;
}
}
cout< for(int i=500;i>0;i--){
if(i%50==0){
cout< }
cout<<(int)x[y];
}
return 0;
}
#include
using namespace std;
int x[1000005];
int main(){
x[1]=1;
int y=1,z;
cin>>z;
for(int i=1;i<=z;i++){
for(int j=1;j<=y;j++){
x[j]*=2;
if(x[j-1]>9){
x[j]+1;
x[j-1]-10;
}
}
if(x[y]>9){
y++;
x[y]=1;
x[y-1]-=10;
}
}
cout<
if(i%50==0){
cout<
cout<<(int)x[y];
}
return 0;
}
全部评论
相关推荐
点赞 评论 收藏
分享
![](https://static.nowcoder.com/fe/file/oss/1716965564844UEBJN.png)
![](https://static.nowcoder.com/fe/file/oss/1716965585666UBBME.png)
TP-LINK
| 校招
| 超多精选岗位
点赞 评论 收藏
分享
01-27 00:39
山东管理学院 嵌入式软件开发 点赞 评论 收藏
分享
![](https://static.nowcoder.com/fe/file/oss/icon_job.png)
点赞 评论 收藏
分享