結果
問題 |
No.2241 Reach 1
|
ユーザー |
|
提出日時 | 2023-03-10 21:42:39 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 359 bytes |
コンパイル時間 | 159 ms |
コンパイル使用メモリ | 82,100 KB |
実行使用メモリ | 56,104 KB |
最終ジャッジ日時 | 2024-09-18 03:57:18 |
合計ジャッジ時間 | 2,752 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 WA * 22 |
ソースコード
import sys sys.setrecursionlimit(5*10**5) input = sys.stdin.readline from collections import defaultdict, deque, Counter from heapq import heappop, heappush from bisect import bisect_left, bisect_right from math import gcd n = int(input()) cnt = 0 while n != 1: if n % 2 == 1: n += 1 else: while n % 2 == 0: n //= 2 cnt += 1 print(cnt)