結果
問題 |
No.183 たのしい排他的論理和(EASY)
|
ユーザー |
![]() |
提出日時 | 2015-04-16 23:41:25 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 485 bytes |
コンパイル時間 | 728 ms |
コンパイル使用メモリ | 78,892 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-04 15:13:13 |
合計ジャッジ時間 | 1,264 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 WA * 5 |
ソースコード
#include <iostream> #include <string> #include <vector> #include <cmath> #include <algorithm> #include <cstdlib> #include <ctime> #include <cstdio> #include <functional> #include <set> #include <sstream> #include <map> #include <queue> #include <stack> using namespace std; int main() { int n; cin>>n; long long _or=0; for(int i=0;i<n;i++){ long long a; cin>>a; _or|=a; } long long res=1; while(_or){ if(_or%2) res*=2LL; _or/=2; } cout<<res<<endl; return 0; }