結果
| 問題 |
No.2534 コラッツ数列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-11-10 21:27:08 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 487 bytes |
| コンパイル時間 | 255 ms |
| コンパイル使用メモリ | 82,172 KB |
| 実行使用メモリ | 86,016 KB |
| 最終ジャッジ日時 | 2024-09-26 01:05:05 |
| 合計ジャッジ時間 | 5,085 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 WA * 3 |
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
n = int(input())
#alist = list(map(int,input().split()))
#alist = []
#s = input()
ans = 1
for i in range(51):
ans += 1
if n == 1:
if ans >= 50:
exit(print('No'))
print('Yes')
exit(print(ans))
if n % 2 == 0:
n //= 2
else:
n = 3*n+1
ans += 1
print('No')