結果

問題 No.3043 yukicoderへようこそ!
ユーザー ugis_progugis_prog
提出日時 2019-04-01 23:31:00
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 930 bytes
コンパイル時間 1,259 ms
コンパイル使用メモリ 147,308 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-08-18 02:45:12
合計ジャッジ時間 1,838 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
using s=string;

random_device rnd;
mt19937 mt(rnd());
uniform_int_distribution<> r(0, 4);
int A;

void sum(){
    long long Sum = 0;
    for(int i=0;i<A;i++){
        long long a;
        cin >> a;
        Sum += a;
    }

    cout << Sum << endl;
}

int FizzBuzz(){
    int B;
    string S;
    cin >> B >> S;
    int p = r(mt);
    cout << "Hello World!" << endl;
    return 0;
    if(p == 0) cout << "Hello World!" << endl;
    else if(p == 1) cout << A*(A+1)/2 << endl;
    else if(p == 2) cout << A+B << " " << S << endl;
    else {
        for(int i=1;i<=A;i++){
            if(i%15 == 0) cout << "FizzBuzz\n";
            else if(i%5 == 0) cout << "Buzz\n";
            else if(i%3 == 0) cout << "Fizz\n";
            else cout << to_string(i) + '\n';  
        }
    }
}


int main(){
    int p = r(mt);
    cin >> A;
    if(A == 10 || A == 100) sum();
    else FizzBuzz();
}
0