結果

問題 No.1286 Stone Skipping
ユーザー aqua_tenhouaqua_tenhou
提出日時 2020-11-13 22:43:45
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 267 bytes
コンパイル時間 239 ms
コンパイル使用メモリ 87,032 KB
実行使用メモリ 75,824 KB
最終ジャッジ日時 2023-09-30 03:44:25
合計ジャッジ時間 3,737 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
71,136 KB
testcase_01 AC 63 ms
71,412 KB
testcase_02 AC 61 ms
71,320 KB
testcase_03 AC 60 ms
71,436 KB
testcase_04 AC 61 ms
71,212 KB
testcase_05 AC 68 ms
71,036 KB
testcase_06 AC 64 ms
71,284 KB
testcase_07 AC 62 ms
71,216 KB
testcase_08 AC 64 ms
71,136 KB
testcase_09 AC 62 ms
71,052 KB
testcase_10 AC 63 ms
71,284 KB
testcase_11 AC 63 ms
71,116 KB
testcase_12 AC 61 ms
71,288 KB
testcase_13 AC 66 ms
75,304 KB
testcase_14 AC 62 ms
71,200 KB
testcase_15 AC 64 ms
75,336 KB
testcase_16 AC 61 ms
71,072 KB
testcase_17 AC 64 ms
71,172 KB
testcase_18 AC 62 ms
71,316 KB
testcase_19 AC 60 ms
71,600 KB
testcase_20 AC 71 ms
71,288 KB
testcase_21 AC 65 ms
71,224 KB
testcase_22 AC 66 ms
75,712 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 71 ms
71,288 KB
testcase_26 AC 68 ms
71,284 KB
testcase_27 AC 67 ms
71,444 KB
testcase_28 AC 72 ms
75,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

d = int(input())
s = d//2
ans = d
is_ok = 0
for i in range(2*10**6+1):
    if is_ok:
        break
    p = 0
    k = s+i
    while k != 0:
        p += k
        k = k//2
        if p == d:
            ans = s+i
            is_ok = 1
            break
    
print(ans)
0