結果
| 問題 |
No.2323 Nafmo、A+Bをする
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-28 14:03:54 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 519 bytes |
| コンパイル時間 | 3,522 ms |
| コンパイル使用メモリ | 159,340 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-26 23:11:01 |
| 合計ジャッジ時間 | 4,164 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 WA * 11 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define i64 int_fast64_t
const i64 INF = INT64_MAX;
const i64 ERR = INT64_MIN;
const i64 MOD = 998244353;
int main() {
int A, B, ans2, ans10;
string num;
cin >> A >> B;
ans2 = A+B;
num = to_string(ans2);
for(int i=0; i < num.size(); i++){
if(num.at(i)=='2'){
num.at(i) = '0';
}
}
ans10=stoi(num, 0, 2);
cout<< ans10 << endl;
}