結果
| 問題 | No.8062 A + B |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-06-03 23:34:37 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 243 bytes |
| 記録 | |
| コンパイル時間 | 766 ms |
| コンパイル使用メモリ | 78,808 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-21 03:31:03 |
| 合計ジャッジ時間 | 1,287 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | WA * 8 |
ソースコード
#include<iostream>
#include<string>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
if(b[0]=='-')
cout<<stoll(a)-stoll(b)<<endl;
else if(a=="0")
cout<<b<<endl;
else if(a!="-0")
cout<<b<<endl;
else
cout<<-stoll(b)<<endl;
}