結果

問題 No.1286 Stone Skipping
ユーザー proriboneproribone
提出日時 2020-11-13 22:22:38
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 251 bytes
コンパイル時間 807 ms
コンパイル使用メモリ 87,304 KB
実行使用メモリ 76,836 KB
最終ジャッジ日時 2023-09-30 03:15:25
合計ジャッジ時間 4,891 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
76,592 KB
testcase_01 AC 85 ms
76,500 KB
testcase_02 AC 97 ms
76,572 KB
testcase_03 AC 82 ms
76,580 KB
testcase_04 AC 83 ms
76,696 KB
testcase_05 AC 87 ms
76,836 KB
testcase_06 AC 81 ms
76,480 KB
testcase_07 AC 80 ms
76,476 KB
testcase_08 AC 92 ms
76,528 KB
testcase_09 AC 92 ms
76,492 KB
testcase_10 AC 93 ms
76,700 KB
testcase_11 AC 91 ms
76,516 KB
testcase_12 AC 93 ms
76,660 KB
testcase_13 AC 100 ms
76,380 KB
testcase_14 AC 105 ms
76,540 KB
testcase_15 AC 101 ms
76,480 KB
testcase_16 AC 101 ms
76,656 KB
testcase_17 AC 100 ms
76,568 KB
testcase_18 AC 81 ms
76,656 KB
testcase_19 AC 81 ms
76,536 KB
testcase_20 AC 102 ms
76,652 KB
testcase_21 AC 103 ms
76,656 KB
testcase_22 AC 95 ms
76,572 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 103 ms
76,420 KB
testcase_26 AC 106 ms
76,544 KB
testcase_27 AC 104 ms
76,668 KB
testcase_28 AC 102 ms
76,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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