結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー troro_kelp
提出日時 2018-10-16 17:29:58
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 380 bytes
コンパイル時間 697 ms
コンパイル使用メモリ 71,468 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-12 18:43:09
合計ジャッジ時間 1,296 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <algorithm>
using namespace std;

long long N;
int main(void)
{
    cin >> N;
    int t=0;
    for (int i = 0; i < N; ++i)
    {
        int a; cin >> a;
        t = t|a;
    }
    int ans=1;
    while(t){
        if(t&1) ans*=2;
        t>>=1;
    }
    cout << ans << endl;
        
    return 0;
}
0