結果

問題 No.222 引き算と足し算
ユーザー fura
提出日時 2020-04-15 06:07:26
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 1,000 ms
コード長 234 bytes
コンパイル時間 2,651 ms
コンパイル使用メモリ 191,900 KB
最終ジャッジ日時 2025-01-09 19:13:34
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

int main(){
	string s; cin>>s;
	stringstream ss(s);
	int a; ss>>a;
	char op; ss>>op;
	int b; ss>>b;
	cout<<(op=='+'?a-b:a+b)<<'\n';
	return 0;
}
0