結果
問題 |
No.581 XOR
|
ユーザー |
|
提出日時 | 2018-02-09 22:57:08 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 332 bytes |
コンパイル時間 | 816 ms |
コンパイル使用メモリ | 61,944 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-08 17:31:15 |
合計ジャッジ時間 | 1,563 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 4 WA * 4 |
ソースコード
#include <iostream> #include <stdio.h> #include <algorithm> #include <math.h> using namespace std; int main(void) { int a, c; int b = 0; cin >> a >> c; for(int i = 0; a!=0||c!=0; i++) { b += pow(2,i)*(a%2!=c%2); a /= 2; c /= 2; } cout << b; return 0; }