結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
71,444 KB
testcase_01 AC 77 ms
71,444 KB
testcase_02 AC 77 ms
71,424 KB
testcase_03 AC 76 ms
71,320 KB
testcase_04 AC 77 ms
71,448 KB
testcase_05 AC 78 ms
71,432 KB
testcase_06 AC 77 ms
71,460 KB
testcase_07 AC 77 ms
71,432 KB
testcase_08 AC 77 ms
71,508 KB
testcase_09 AC 75 ms
71,508 KB
testcase_10 AC 76 ms
71,148 KB
testcase_11 AC 75 ms
71,296 KB
testcase_12 AC 78 ms
71,136 KB
testcase_13 AC 80 ms
75,520 KB
testcase_14 AC 80 ms
71,300 KB
testcase_15 AC 80 ms
75,572 KB
testcase_16 AC 78 ms
71,452 KB
testcase_17 AC 77 ms
71,640 KB
testcase_18 AC 77 ms
71,348 KB
testcase_19 AC 77 ms
71,456 KB
testcase_20 AC 78 ms
71,424 KB
testcase_21 AC 79 ms
71,428 KB
testcase_22 AC 85 ms
75,844 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 78 ms
71,340 KB
testcase_26 AC 79 ms
71,252 KB
testcase_27 AC 78 ms
71,424 KB
testcase_28 AC 78 ms
75,548 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

d = int(input())
s = d//2
ans = d
is_ok = 0
for i in range(10**7):
    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