結果
| 問題 |
No.939 and or
|
| コンテスト | |
| ユーザー |
%20
|
| 提出日時 | 2018-08-16 01:57:38 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 12 ms / 2,000 ms |
| コード長 | 287 bytes |
| コンパイル時間 | 2,133 ms |
| コンパイル使用メモリ | 193,328 KB |
| 最終ジャッジ日時 | 2025-01-06 12:20:59 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 30 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
4 | main(){cin.tie(0);ios::sync_with_stdio(false);
| ^~~~
ソースコード
#include<bits/stdc++.h>
using namespace std;
main(){cin.tie(0);ios::sync_with_stdio(false);
int A,B,x=1;
bool f=false;
cin>>A>>B;
for(;A||B;A/=2,B/=2){
if(A%2==0&&B%2==1){
if(f){
x*=2;
}else{
f=true;
}
}else if(A%2==1&&B%2==0){
x=0;
}
}
cout<<x<<endl;
}
%20