結果
| 問題 |
No.2534 コラッツ数列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-11-10 21:26:02 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 435 bytes |
| コンパイル時間 | 286 ms |
| コンパイル使用メモリ | 82,248 KB |
| 実行使用メモリ | 85,888 KB |
| 最終ジャッジ日時 | 2024-09-26 01:04:11 |
| 合計ジャッジ時間 | 5,604 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 29 WA * 4 |
ソースコード
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:
print('Yes')
exit(print(ans))
if n % 2 == 0:
n //= 2
else:
n = 3*n+1
ans += 1
print('No')