結果
| 問題 |
No.1298 OR XOR
|
| コンテスト | |
| ユーザー |
H20
|
| 提出日時 | 2020-11-27 21:56:12 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 359 bytes |
| コンパイル時間 | 284 ms |
| コンパイル使用メモリ | 82,336 KB |
| 実行使用メモリ | 53,696 KB |
| 最終ジャッジ日時 | 2024-07-26 12:28:23 |
| 合計ジャッジ時間 | 1,982 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 10 WA * 3 |
ソースコード
N = int(input())
NBIT = N
cnt = 0
A = ''
B = ''
while NBIT:
if NBIT & 1 == 1:
cnt+=1
if cnt % 2==0:
A += '1'
B += '0'
else:
A += '0'
B += '1'
else:
A += '0'
B += '0'
NBIT >>= 1
if cnt%2==1:
print(-1,-1,-1)
else:
print(N,int(A[::-1],2) ,int(B[::-1],2))
H20