結果

問題 No.1298 OR XOR
ユーザー game_krbgame_krb
提出日時 2020-12-28 18:03:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 278 bytes
コンパイル時間 132 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 17,820 KB
最終ジャッジ日時 2024-04-14 11:42:41
合計ジャッジ時間 4,387 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 31 ms
10,752 KB
testcase_02 AC 30 ms
10,624 KB
testcase_03 AC 30 ms
10,752 KB
testcase_04 AC 30 ms
10,752 KB
testcase_05 AC 30 ms
10,624 KB
testcase_06 TLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

a = n
b = -1
c = -1
if str(bin(a)).count('1') >= 3:
    for i in range(0,a):
        if a & 1<<i and b != -1:
            c = 1<<i
     
        elif a & 1 << i and b == -1:
            b = 1<<i

if b==-1 or c==-1:
    print("-1 -1 -1")
else:
    print(a,b,c)
0