結果

問題 No.593 4進FizzBuzz
ユーザー kcz146kcz146
提出日時 2017-11-27 19:04:09
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 20 ms / 2,000 ms
コード長 194 bytes
コンパイル時間 146 ms
コンパイル使用メモリ 25,744 KB
実行使用メモリ 6,652 KB
最終ジャッジ日時 2023-08-18 07:37:28
合計ジャッジ時間 3,002 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,384 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 2 ms
4,376 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 1 ms
4,380 KB
testcase_14 AC 1 ms
4,376 KB
testcase_15 AC 1 ms
4,380 KB
testcase_16 AC 19 ms
5,904 KB
testcase_17 AC 19 ms
6,040 KB
testcase_18 AC 19 ms
6,224 KB
testcase_19 AC 19 ms
5,056 KB
testcase_20 AC 19 ms
6,460 KB
testcase_21 AC 18 ms
5,156 KB
testcase_22 AC 20 ms
4,920 KB
testcase_23 AC 18 ms
4,988 KB
testcase_24 AC 19 ms
5,684 KB
testcase_25 AC 19 ms
6,344 KB
testcase_26 AC 19 ms
5,292 KB
testcase_27 AC 20 ms
4,868 KB
testcase_28 AC 19 ms
5,716 KB
testcase_29 AC 20 ms
5,504 KB
testcase_30 AC 18 ms
5,104 KB
testcase_31 AC 19 ms
5,572 KB
testcase_32 AC 19 ms
6,652 KB
testcase_33 AC 19 ms
5,604 KB
testcase_34 AC 19 ms
5,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<cstdio>

int main(void) {
char s[5000000];
scanf("%s",s);
int a=0;
char *p = s;
while(*p) a*=4, a+=*p++-'0', a%=15;
printf("%s\n", a%15==0?"FizzBuzz":(a%3==0?"Fizz":a%5==0?"Buzz":s));
}
0