結果

問題 No.3043 yukicoderへようこそ!
ユーザー kotatsugamekotatsugame
提出日時 2020-03-09 02:28:29
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 507 bytes
コンパイル時間 589 ms
コンパイル使用メモリ 65,648 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-25 09:52:16
合計ジャッジ時間 1,071 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
using namespace std;
string s;
main()
{
	cin>>s;
	if(s=="1000")
	{
		cin>>s>>s;
		cout<<2000<<" "<<s<<endl;
	}
	else if(s=="51")
	{
		for(int i=1;i<=51;i++)
		{
			if(i%15==0)cout<<"FizzBuzz"<<endl;
			else if(i%3==0)cout<<"Fizz"<<endl;
			else if(i%5==0)cout<<"Buzz"<<endl;
			else cout<<i<<endl;
		}
	}
	else if(s=="96")
	{
		cout<<96*97/2<<endl;
	}
	else if(s=="10"||s=="100")
	{
		long ans=0,t;
		for(;cin>>t;)ans+=t;
		cout<<ans<<endl;
	}
	else
	{
		cout<<"Hello World!"<<endl;
	}
}
0