結果
問題 |
No.8062 A + B
|
ユーザー |
![]() |
提出日時 | 2020-04-01 22:28:42 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 455 bytes |
コンパイル時間 | 1,461 ms |
コンパイル使用メモリ | 165,760 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 11:40:53 |
合計ジャッジ時間 | 2,016 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 1 WA * 7 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i = 0; i < (n);i++) #define sz(x) int(x.size()) typedef long long ll; typedef pair<int,int> P; constexpr int INF = 1e9; int main() { string a, b; cin >> a >> b; bool m = false; if (a[0] == '-') m = true; int d = a.back() - '0'; if (m) d *= -1; m = false; if (b[0] == '-') m = true; int c = b.back() - '0'; if (m) c *= -1; cout << d + c << endl; return 0; }