結果

問題 No.593 4進FizzBuzz
ユーザー kcz146kcz146
提出日時 2017-11-27 19:01:45
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 184 bytes
コンパイル時間 111 ms
コンパイル使用メモリ 22,656 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-05-05 13:25:41
合計ジャッジ時間 4,418 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
5,248 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 RE -
testcase_31 RE -
testcase_32 RE -
testcase_33 RE -
testcase_34 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:6: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 | scanf("%s",s);
      | ~~~~~^~~~~~~~

ソースコード

diff #

#include<cstdio>

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