OQWQO @ 2024-09-11 18:45:28
为啥我的 Subtask #1 全是TLE?评测记录
by yangguang_ @ 2024-09-11 18:46:18
唔……我是小白
by tr_712_11 @ 2024-09-11 18:47:50
代码发出来 @OQWQO
by tr_712_11 @ 2024-09-11 18:48:33
@bpyy 不要在讨论区里题解
by OQWQO @ 2024-09-11 18:50:20
@tr_712_11 我的代码不是在评测记录里吗
by Iron_sheets @ 2024-09-11 18:51:31
评测记录无权限,看不到
by OQWQO @ 2024-09-11 18:52:23
@bpyy 好吧
by heyx0201 @ 2024-09-11 19:03:41
@OQWQO 不开 long long 导致的
by OQWQO @ 2024-09-11 19:04:26
@heyx0201 thx
by tuonisitake @ 2024-09-25 23:53:28
#include <stdio.h>
int main()
{
long long n;
scanf("%lld",&n);
while (n!=1)
{
if(n%2==0)
{
printf("%lld/2=",n);
n/=2;
printf("%lld\n",n);
}
else if(n%2!=0){
printf("%lld*3+1=",n);
n=n*3+1;
printf("%lld\n",n);
}
}
printf("End");
return 0;
}