結果
| 問題 | No.1298 OR XOR | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2022-02-03 05:59:01 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 46 ms / 2,000 ms | 
| コード長 | 363 bytes | 
| コンパイル時間 | 199 ms | 
| コンパイル使用メモリ | 82,432 KB | 
| 実行使用メモリ | 51,968 KB | 
| 最終ジャッジ日時 | 2024-06-11 09:41:00 | 
| 合計ジャッジ時間 | 1,814 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 13 | 
ソースコード
def yukicoder1298(i):
    C = i
    Ch = bin(i)[2:]
#    print(Ch, Ch.count('1'))
    if Ch.count('1') > 1:
        j = 1
        while True:
            if Ch[-j] == '1':
                break
            j += 1
        B = 2 ** (j - 1)
        A = C ^ B
        print(A, B, C)
    else:
        print(-1, -1, -1)
        
    
i = int(input())
yukicoder1298(i)
            
            
            
        