結果

問題 No.3043 yukicoderへようこそ!
ユーザー leaf_1415leaf_1415
提出日時 2019-04-01 23:35:16
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 553 bytes
コンパイル時間 481 ms
コンパイル使用メモリ 52,132 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-18 02:49:18
合計ジャッジ時間 990 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <string>
#include <stdlib.h>
#define llint long long

using namespace std;

string s;

int main(void)
{
	cin >> s;
	
	if(s[0] > '0' && s[0] <= '9'){
		int a = atoi(s.c_str()), b;
		if(cin >> b){
			cin >> s;
			/*if(s[0] > '0' && s[0] <= '9'){
				llint sum = b + atoi(s.c_str());
				for(int i = 0; i < a-2; i++) cin >> b, sum += b;
				cout << sum << endl;
				return 0;
			}*/
			cout << a+b << " " << s << endl;
			return 0;
		}
		cout << a*(a+1)/2 << endl;
		return 0;
	}
	
	cout << "Hello World!" << endl;
	return 0;
}
0