結果

問題 No.1286 Stone Skipping
ユーザー proriboneproribone
提出日時 2020-11-13 22:20:19
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 245 bytes
コンパイル時間 2,234 ms
コンパイル使用メモリ 86,548 KB
実行使用メモリ 75,464 KB
最終ジャッジ日時 2023-09-30 03:12:41
合計ジャッジ時間 5,813 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
75,012 KB
testcase_01 AC 73 ms
74,888 KB
testcase_02 AC 76 ms
74,944 KB
testcase_03 AC 75 ms
75,072 KB
testcase_04 AC 75 ms
75,168 KB
testcase_05 AC 74 ms
75,160 KB
testcase_06 AC 74 ms
75,176 KB
testcase_07 AC 74 ms
75,208 KB
testcase_08 AC 74 ms
75,328 KB
testcase_09 AC 75 ms
75,324 KB
testcase_10 AC 74 ms
75,168 KB
testcase_11 AC 75 ms
75,220 KB
testcase_12 AC 75 ms
75,328 KB
testcase_13 AC 74 ms
75,156 KB
testcase_14 AC 74 ms
75,184 KB
testcase_15 AC 74 ms
75,160 KB
testcase_16 AC 75 ms
75,464 KB
testcase_17 AC 74 ms
75,128 KB
testcase_18 AC 73 ms
75,176 KB
testcase_19 AC 74 ms
75,208 KB
testcase_20 AC 75 ms
75,256 KB
testcase_21 AC 74 ms
75,376 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 74 ms
75,184 KB
testcase_26 AC 74 ms
75,156 KB
testcase_27 AC 74 ms
75,120 KB
testcase_28 AC 74 ms
75,260 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-200),D//2+200):
    if check(x,D):
        ans=min(ans,x)
print(ans)
0