結果

問題 No.3043 yukicoderへようこそ!
ユーザー hibari2357hibari2357
提出日時 2019-04-01 23:25:41
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,472 bytes
コンパイル時間 923 ms
コンパイル使用メモリ 107,256 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-18 02:39:00
合計ジャッジ時間 1,412 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <random>
#include <chrono>
#include <queue>
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
typedef pair<ll, ll> PLL;
#define fs first
#define sc second
#define INF 1000000000
#define MOD 1000000007
#define EPS 0.00000001


int main() {
    
    srand(time(NULL));
    int t = rand()%6;
    
    
    if(t==0){
        //    1問目
        int c, d; cin >> c >> d;
        string e; cin >> e;
        cout << c+d << " " << e << endl;

    }else if(t==1){
        //    2問目
        int N; cin >> N;
        for(int i=1; i<=N; i++){
            if(i%15==0){
                cout << "FizzBuzz" << endl;
            }else if(i%5==0){
                cout << "Buzz" << endl;
            }else if(i%3==0){
                cout << "Fizz" << endl;
            }else{
                cout << i << endl;
            }
        }
    }else if(t==2){
        //    3問目
        string s; cin >> s;
        cout << "Hello World!" << endl;
    }else if(t==3){
        //4問目
        int a; cin >> a;
        cout << a * (a+1)/2 << endl;
    }else{
        //  5,6問目
        int M2; cin >> M2;
        ll sum2 = 0;
        vector<ll> B(M2);
        for(ll &b:B){
            cin >> b;
            
            sum2 += b;
        }
        cout << sum2 << endl;
        
    }
    
    return 0;
}
0