結果

問題 No.1286 Stone Skipping
ユーザー mlihua09mlihua09
提出日時 2020-11-13 22:12:46
言語 PyPy3
(7.3.13)
結果
WA  
実行時間 -
コード長 600 bytes
コンパイル時間 1,967 ms
コンパイル使用メモリ 86,956 KB
実行使用メモリ 76,580 KB
最終ジャッジ日時 2023-09-30 03:02:55
合計ジャッジ時間 3,851 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,488 KB
testcase_01 AC 78 ms
75,812 KB
testcase_02 AC 81 ms
76,448 KB
testcase_03 AC 73 ms
71,572 KB
testcase_04 AC 75 ms
76,352 KB
testcase_05 AC 77 ms
76,548 KB
testcase_06 AC 75 ms
76,364 KB
testcase_07 AC 71 ms
71,080 KB
testcase_08 AC 80 ms
76,440 KB
testcase_09 AC 80 ms
76,512 KB
testcase_10 AC 75 ms
75,708 KB
testcase_11 AC 76 ms
75,636 KB
testcase_12 AC 77 ms
75,556 KB
testcase_13 AC 78 ms
75,640 KB
testcase_14 AC 78 ms
75,780 KB
testcase_15 AC 79 ms
76,544 KB
testcase_16 AC 79 ms
75,724 KB
testcase_17 AC 79 ms
76,228 KB
testcase_18 WA -
testcase_19 AC 76 ms
76,020 KB
testcase_20 AC 76 ms
75,748 KB
testcase_21 AC 73 ms
75,636 KB
testcase_22 AC 80 ms
76,236 KB
testcase_23 AC 79 ms
76,168 KB
testcase_24 AC 78 ms
76,580 KB
testcase_25 AC 73 ms
75,700 KB
testcase_26 AC 74 ms
75,848 KB
testcase_27 AC 76 ms
75,720 KB
testcase_28 AC 78 ms
76,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

D = int(input())

for i in range(60, 0, -1):
    
    x = 1
    
    y = D
    
    while x + 1 < y:
        
        z = (x + y) // 2
        
        Z = z
        
        a = 0
        
        for _ in range(i):
            
            a += z
            
            z //= 2
        
        
        if a >= D:
            
            y = Z
            
        else:
            
            x = Z
        

        
    a = 0
    z = x + 1
    for _ in range(i):
        
        a += z
        
        z //= 2
        
    if a == D:
        
        print(x + 1)
        
        exit()
0