結果
問題 |
No.939 and or
|
ユーザー |
|
提出日時 | 2019-12-03 12:13:16 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 304 bytes |
コンパイル時間 | 1,605 ms |
コンパイル使用メモリ | 166,176 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-26 22:46:00 |
合計ジャッジ時間 | 3,000 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 6 WA * 24 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ int a,b;cin >> a >> b; if(a==b){ cout << 1 << endl; return 0; } int ans=1; while(a!=0&&b!=0){ if((a&1)&(b&1)){ ans*=2; } a>>=1; b>>=1; } cout << ans << endl; }