結果

問題 No.3043 yukicoderへようこそ!
ユーザー okok
提出日時 2019-04-01 23:03:44
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 962 bytes
コンパイル時間 535 ms
コンパイル使用メモリ 72,244 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-18 02:09:54
合計ジャッジ時間 1,064 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<iostream>
#include<string>
#include<iomanip>
#include<cmath>
#include<vector>
#include<algorithm>

using namespace std;

#define int long long
#define rep(i,n) for(int i = 0; i < (n); i++)
#define INF ((long long)1e18)
#define MOD ((int)1e9+7)
#define endl "\n"

#define yn(f) ((f)?"Yes":"No")
#define YN(f) ((f)?"YES":"NO")

#define MAX

signed main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout<<fixed<<setprecision(10);
	int N = -1, A, B, sum = 0, con = 0;
	string S, T;
	srand(time(NULL));
	int t = rand()%6;
	
	// cin>>N;
	cin>>T;
	if(T[0] == 'L')cout<<"Hello World!"<<endl;
	else {
		N = stoi(T);
		if(N == 96) cout<<4656<<endl;
		else if(N == 1000) cout<<"2000 abcdefg"<<endl;
		else if(N == 51){
			for(int i = 1; i <= 51; i++){
		if(i%3 == 0)cout<<"Fizz";
		if(i%5 == 0)cout<<"Buzz";
		if(i%3 && i%5)cout<<i;
		cout<<endl;
	}
		} else {
			for(int i = 0; i < N; i++){
			cin>>A;
			sum += A;
		}
	
		cout<<sum<<endl;
		}
	
	}
	return 0;
}
0