結果
問題 | No.851 テストケース |
ユーザー |
![]() |
提出日時 | 2019-08-12 11:40:46 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 3,153 ms |
コード長 | 481 bytes |
コンパイル時間 | 1,332 ms |
コンパイル使用メモリ | 159,096 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-15 08:38:13 |
合計ジャッジ時間 | 2,212 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include"bits/stdc++.h" using namespace std; int main(){ long a, b, c; string s; getline(cin, s); getline(cin, s); for (int i = 0; i < s.size(); i++) { if (s[i] == ' ') { cout << '"' << 'a' << 's' << 's' << 'e' << 'r' << 't' << '"' << endl; return 0; } } a = atol(s.c_str()); cin >> b >> c; long n = a + b; a = a + c; b = b + c; c = max({ n,a,b }); if (n == c)n = 0; if (a == c)a = 0; if (b == c)b = 0; cout << max({ n, a, b }) << endl; }