結果

問題 No.1286 Stone Skipping
ユーザー proriboneproribone
提出日時 2020-11-13 22:22:12
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 247 bytes
コンパイル時間 613 ms
コンパイル使用メモリ 87,092 KB
実行使用メモリ 76,188 KB
最終ジャッジ日時 2023-09-30 03:14:58
合計ジャッジ時間 4,253 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
75,436 KB
testcase_01 AC 76 ms
75,320 KB
testcase_02 AC 82 ms
75,832 KB
testcase_03 AC 77 ms
75,980 KB
testcase_04 AC 77 ms
76,052 KB
testcase_05 AC 77 ms
76,188 KB
testcase_06 AC 78 ms
75,860 KB
testcase_07 AC 78 ms
75,860 KB
testcase_08 AC 77 ms
76,156 KB
testcase_09 AC 77 ms
75,876 KB
testcase_10 AC 76 ms
76,044 KB
testcase_11 AC 77 ms
75,864 KB
testcase_12 AC 77 ms
76,164 KB
testcase_13 AC 77 ms
76,160 KB
testcase_14 AC 78 ms
76,016 KB
testcase_15 AC 77 ms
76,112 KB
testcase_16 AC 77 ms
75,800 KB
testcase_17 AC 76 ms
76,036 KB
testcase_18 AC 74 ms
75,400 KB
testcase_19 AC 74 ms
75,440 KB
testcase_20 AC 77 ms
76,164 KB
testcase_21 AC 78 ms
76,008 KB
testcase_22 AC 76 ms
76,164 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 76 ms
75,804 KB
testcase_26 AC 77 ms
76,040 KB
testcase_27 AC 77 ms
75,952 KB
testcase_28 AC 77 ms
75,952 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-1000),D//2+1000):
    if check(x,D):
        ans=min(ans,x)
print(ans)
0