- 角谷猜想
为什么100WA啊?!
- 2024-9-15 16:30:58 @
#include<bits/stdc++.h>
using namespace std;
int n;
int main(){
scanf("%d",&n);
while(n!=1){
if(n%2){
printf("%d*3+1=%d\n",n,n*3+1);
++(n*=3);
}
else{
printf("%d/2=%d\n",n,n>>1);
n>>=1;
}
}
printf("%s","End");
return 0;
}
2 comments
-
C23pengweixuan LV 4 @ 2024-9-15 16:36:33
#include<bits/stdc++.h> using namespace std; int n; int main(){ scanf("%d",&n); while(n!=1) n%2?printf("%d*3+1=%d\n",(n-1)/3,n=n*3+1):printf("%d/2=%d\n",n<<1,n>>=1); printf("%s","End"); return 0; }
我虽然无能为力,但是我可以给你压个行
-
2024-9-15 16:31:59@
我不明白(浙江省宁波市奉化区溪口镇口音)
- 1
Information
- ID
- 6921
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 1
- Tags
- # Submissions
- 17
- Accepted
- 0
- Uploaded By