結果

問題 No.9001 標準入出力の練習問題(テスト用)
ユーザー leaf_1415leaf_1415
提出日時 2019-04-01 22:32:26
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 357 bytes
コンパイル時間 354 ms
コンパイル使用メモリ 51,948 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-18 01:43:48
合計ジャッジ時間 776 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <string>
#include <stdlib.h>

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;
			cout << a+b << " " << s << endl;
			return 0;
		}
		cout << a*(a+1)/2 << endl;
		return 0;
	}
	
	cout << "Hello World!" << endl;
	return 0;
}
0