結果

問題 No.1450 nahco314's First Problem
ユーザー 👑 tamatotamato
提出日時 2021-03-31 15:53:26
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 389 bytes
コンパイル時間 377 ms
コンパイル使用メモリ 86,980 KB
実行使用メモリ 75,948 KB
最終ジャッジ日時 2023-08-08 08:36:08
合計ジャッジ時間 5,503 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,712 KB
testcase_01 AC 75 ms
75,648 KB
testcase_02 AC 74 ms
75,636 KB
testcase_03 AC 71 ms
71,420 KB
testcase_04 AC 72 ms
71,508 KB
testcase_05 AC 75 ms
75,580 KB
testcase_06 AC 75 ms
75,448 KB
testcase_07 AC 76 ms
75,640 KB
testcase_08 AC 77 ms
75,580 KB
testcase_09 AC 75 ms
75,652 KB
testcase_10 AC 74 ms
75,448 KB
testcase_11 AC 76 ms
75,660 KB
testcase_12 AC 77 ms
75,508 KB
testcase_13 AC 76 ms
75,460 KB
testcase_14 AC 75 ms
75,452 KB
testcase_15 AC 73 ms
75,484 KB
testcase_16 AC 74 ms
75,676 KB
testcase_17 AC 75 ms
75,936 KB
testcase_18 AC 75 ms
75,452 KB
testcase_19 AC 77 ms
75,672 KB
testcase_20 AC 75 ms
75,472 KB
testcase_21 AC 75 ms
75,652 KB
testcase_22 AC 76 ms
75,308 KB
testcase_23 AC 75 ms
75,648 KB
testcase_24 AC 74 ms
75,560 KB
testcase_25 AC 75 ms
75,644 KB
testcase_26 AC 73 ms
75,244 KB
testcase_27 AC 77 ms
75,792 KB
testcase_28 AC 75 ms
75,572 KB
testcase_29 AC 74 ms
75,464 KB
testcase_30 AC 75 ms
75,572 KB
testcase_31 AC 74 ms
75,568 KB
testcase_32 AC 75 ms
75,576 KB
testcase_33 AC 73 ms
75,620 KB
testcase_34 AC 75 ms
75,948 KB
testcase_35 AC 73 ms
75,632 KB
testcase_36 AC 75 ms
75,704 KB
testcase_37 AC 75 ms
75,292 KB
testcase_38 AC 74 ms
75,460 KB
testcase_39 AC 75 ms
75,452 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    X = int(input())
    for M in range(62):
        N = X ^ M
        cnt = 0
        for i in range(62):
            cnt += N >> i & 1
        if cnt == M:
            if 0 < N <= 2 * 10 ** 18:
                print(N)
                exit()
    print(-1)


if __name__ == '__main__':
    main()
0