結果

問題 No.593 4進FizzBuzz
ユーザー kosakkunkosakkun
提出日時 2017-11-10 22:28:27
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,014 bytes
コンパイル時間 980 ms
コンパイル使用メモリ 110,828 KB
実行使用メモリ 7,316 KB
最終ジャッジ日時 2024-05-03 12:38:19
合計ジャッジ時間 3,608 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 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
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 1 ms
5,376 KB
testcase_14 AC 1 ms
5,376 KB
testcase_15 AC 1 ms
5,376 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 39 ms
7,184 KB
testcase_19 AC 40 ms
7,184 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 40 ms
7,184 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 40 ms
7,316 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 42 ms
7,184 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 40 ms
7,180 KB
testcase_33 AC 40 ms
7,180 KB
testcase_34 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <string>
#include <algorithm>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
#include <limits>
#include <random>
#include <complex>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <string.h>
#include <iomanip>
using namespace std;

#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define RREP(i,n) for(int (i)=(int)(n)-1;i>=0;i--)
#define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end())
typedef long long ll;

int main() {

    string S; cin >> S;

    long long N = 0;
    REP(i,S.size()) {
        N *= 4;
        N += (S[i] - '0');
    }

    if (N % 3 == 0 && N % 5 == 0) {
        cout << "FizzBuzz" << endl;
    } else if (N % 3 == 0) {
        cout << "Fizz" << endl;
    } else if (N % 5 == 0) {
        cout << "Buzz" << endl;
    } else {
        cout << S << endl;
    }

    return 0;
}
0