結果
問題 | No.2323 Nafmo、A+Bをする |
ユーザー | どりみあん |
提出日時 | 2023-05-28 13:37:15 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,184 bytes |
コンパイル時間 | 1,586 ms |
コンパイル使用メモリ | 169,320 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-08-27 08:09:02 |
合計ジャッジ時間 | 2,579 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,380 KB |
testcase_01 | AC | 2 ms
4,380 KB |
testcase_02 | AC | 2 ms
4,380 KB |
testcase_03 | AC | 2 ms
4,380 KB |
testcase_04 | AC | 2 ms
4,380 KB |
testcase_05 | AC | 1 ms
4,380 KB |
testcase_06 | AC | 2 ms
4,376 KB |
testcase_07 | AC | 1 ms
4,376 KB |
testcase_08 | AC | 1 ms
4,376 KB |
testcase_09 | AC | 1 ms
4,376 KB |
testcase_10 | AC | 1 ms
4,380 KB |
testcase_11 | AC | 2 ms
4,376 KB |
testcase_12 | AC | 2 ms
4,380 KB |
testcase_13 | AC | 2 ms
4,380 KB |
testcase_14 | AC | 2 ms
4,380 KB |
testcase_15 | AC | 1 ms
4,380 KB |
testcase_16 | AC | 2 ms
4,380 KB |
testcase_17 | AC | 2 ms
4,376 KB |
testcase_18 | AC | 2 ms
4,380 KB |
testcase_19 | AC | 2 ms
4,380 KB |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<ll, ll> pll; const ll LongINF=1000000000000000000; const int INF=1000000007; const int dx[]={0,1,0,-1}; const int dy[]={1,0,-1,0}; template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}return false;} template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;} template <class T, class Y>T GCD(T a, Y b){if(a<b){T c=a;a=b;b=c;}if (a % b == 0){return b;}return GCD(b, a % b);} template<class T,class Y>T LCM(T a,Y b){return (a*b)/GCD(a,b);} void clear(queue<pair<int, int>> &q){queue<pair<int, int>> empty;swap(q, empty);} //queueの中身の型は適時変更を忘れない using vi=vector<int>; using vii=vector<vi>; #define REP(i,a,b) for(ll i=(a);i<(b);i++) #define rep(i,n) REP(i,0,n) #define pb push_back #define rv reverse #define ALL(a) (a).begin(),(a).end() #define decimal(x) fixed<<setprecision(x) int main(){ string a,b; cin>>a>>b; bitset<32> bs1(a),bs2(b); ll x=1,ans=0; rep(i,33){ if(bs1[i]!=bs2[i])ans+=x; x*=2; } cout<<ans<<endl; return 0; } /* */