結果

問題 No.1286 Stone Skipping
ユーザー proriboneproribone
提出日時 2020-11-13 22:41:11
言語 PyPy3
(7.3.13)
結果
WA  
実行時間 -
コード長 286 bytes
コンパイル時間 521 ms
コンパイル使用メモリ 87,008 KB
実行使用メモリ 76,640 KB
最終ジャッジ日時 2023-09-30 03:41:14
合計ジャッジ時間 4,783 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
76,608 KB
testcase_01 AC 76 ms
76,316 KB
testcase_02 AC 86 ms
76,428 KB
testcase_03 AC 75 ms
76,592 KB
testcase_04 AC 73 ms
76,520 KB
testcase_05 AC 79 ms
76,492 KB
testcase_06 AC 82 ms
76,492 KB
testcase_07 AC 81 ms
76,420 KB
testcase_08 AC 80 ms
76,572 KB
testcase_09 AC 79 ms
76,640 KB
testcase_10 AC 79 ms
76,532 KB
testcase_11 AC 80 ms
76,312 KB
testcase_12 AC 77 ms
76,528 KB
testcase_13 AC 79 ms
76,332 KB
testcase_14 AC 81 ms
76,640 KB
testcase_15 AC 81 ms
76,324 KB
testcase_16 AC 81 ms
76,400 KB
testcase_17 AC 82 ms
76,424 KB
testcase_18 AC 77 ms
76,516 KB
testcase_19 AC 81 ms
76,516 KB
testcase_20 AC 86 ms
76,520 KB
testcase_21 AC 86 ms
76,576 KB
testcase_22 AC 79 ms
76,288 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 83 ms
76,604 KB
testcase_26 AC 79 ms
76,412 KB
testcase_27 AC 85 ms
76,536 KB
testcase_28 AC 83 ms
76,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def check(x,D):
    res=0
    while(x):
        res+=x
        x//=2
        if res==D:
            return True
    if res==D:
        return True
    else:
        return False

D=int(input())
ans=D
for x in range(D//2,D//2+100000):
    if check(x,D):
        ans=min(ans,x)
print(ans)
0