結果

問題 No.3062 A + B
ユーザー shop_oneshop_one
提出日時 2020-04-01 22:12:53
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 686 bytes
コンパイル時間 787 ms
コンパイル使用メモリ 95,068 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-09 18:32:11
合計ジャッジ時間 1,479 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 1 ms
4,376 KB
testcase_09 WA -
testcase_10 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

// I SELL YOU...! 
#include<iostream>
#include<vector>
#include<algorithm>
#include<functional>
#include<queue>
#include<chrono>
#include<iomanip>
#include<map>
#include<set>

using namespace std;
using ll = long long;
using P = pair<ll,ll>;
void init_io(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << setprecision(10);
}
signed main(){
  init_io();
  string a,b;
  cin >> a >> b;
  bool check = true;
  for(char c:a){
    if(c!='-'&&(c>'9'||c<'0')){
      check = false;
    }
  }
  for(char c:b){
    if(c>'9'||c<'0'){
      check = false;
    }
  }
  if(!check){
    cout << a + b <<endl; 
  }else{
    ll x = stol(a);
    ll y = stol(b);
    cout << x + y << endl;
  }
}
0