結果

問題 No.593 4進FizzBuzz
ユーザー slimslim
提出日時 2018-01-27 15:38:33
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 453 bytes
コンパイル時間 505 ms
コンパイル使用メモリ 28,300 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-28 09:54:26
合計ジャッジ時間 4,005 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 0 ms
4,384 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 0 ms
4,380 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 0 ms
4,376 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 1 ms
4,376 KB
testcase_14 AC 0 ms
4,376 KB
testcase_15 AC 1 ms
4,376 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 5 ms
4,376 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 4 ms
4,376 KB
testcase_22 AC 5 ms
4,376 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 5 ms
4,380 KB
testcase_26 AC 6 ms
4,376 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 5 ms
4,376 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 5 ms
4,376 KB
testcase_33 AC 5 ms
4,376 KB
testcase_34 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: 関数 ‘main’ 内:
main.c:8:3: 警告: implicit declaration of function ‘gets’; did you mean ‘fgets’? [-Wimplicit-function-declaration]
    8 |   gets(n);
      |   ^~~~
      |   fgets
/tmp/ccC8POez.o: In function `main':
main.c:(.text.startup+0xd): warning: the `gets' function is dangerous and should not be used.

ソースコード

diff #

#include <stdio.h>
#include <string.h>

int main()
{
  char n[2000001];
  int n10,temp,i,len,four;
  gets(n);
  len = strlen(n)-1;
  n10 = 0;
  four = 1;
  while(len >= 0){
    temp = n[len] - '0';
    n10 += temp * four;
    four *= 4;
    len--;
  }
  if(n10 % 15 == 0){
    printf("FizzBuzz");
  }else if(n10 % 3 == 0){
    printf("Fizz");
  }else if(n10 % 5 == 0){
    printf("Buzz");
  }else{
    printf("%s",n);
  }
  printf("\n");
  return(0);
}
0