結果

問題 No.1298 OR XOR
ユーザー deuteridayo
提出日時 2020-11-28 09:40:28
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 459 bytes
コンパイル時間 3,775 ms
コンパイル使用メモリ 229,924 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-12 22:11:09
合計ジャッジ時間 5,280 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other AC * 7 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#include<atcoder/all>
using namespace std;
using namespace atcoder;
long const mod = 1e9+7;
// long const mod = 998244353;
 
int main(){
    long n;
    cin >> n;
    long a,b,c;
    a = n;
    b = 0;
    c = 0;
    for(long i=0;i<=15;i++){
        if(a & (1<<i)){
            b += (1<<i);
        }
    }
    for(long i=16;i<=30;i++){
        if(a & (1<<i)){
            c += (1<<i);
        }
    }
    printf("%ld %ld %ld",a,b,c);
}
0