結果
問題 |
No.2241 Reach 1
|
ユーザー |
|
提出日時 | 2023-03-10 22:17:00 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 225 bytes |
コンパイル時間 | 337 ms |
コンパイル使用メモリ | 81,536 KB |
実行使用メモリ | 260,088 KB |
最終ジャッジ日時 | 2024-09-18 04:28:03 |
合計ジャッジ時間 | 4,940 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 WA * 1 TLE * 1 -- * 17 |
ソースコード
n=int(input()) ans=0 if n%2==0: while(n%2==0): n//=2 ans+=1 while(n!=1): if n%4==1: n=n*(n-2)+1 else: n=n*(n+2)+1 ans+=1 while(n%2==0): n//=2 ans+=1 print(ans)