結果
問題 |
No.593 4進FizzBuzz
|
ユーザー |
![]() |
提出日時 | 2018-09-29 17:51:37 |
言語 | C (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 294 bytes |
コンパイル時間 | 129 ms |
コンパイル使用メモリ | 27,776 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-12 08:18:21 |
合計ジャッジ時間 | 3,787 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 12 RE * 19 |
コンパイルメッセージ
main.c: In function 'main': main.c:7:21: warning: implicit declaration of function 'strtol' [-Wimplicit-function-declaration] 7 | long num2 = strtol(N, NULL, 4); | ^~~~~~
ソースコード
#include <stdio.h> int main(void){ char N[11]; scanf("%s", N); long num2 = strtol(N, NULL, 4); if (num2 % 3 == 0 && num2 % 5 == 0) { printf("FizzBuzz"); } else if (num2 % 3 == 0) { printf("Fizz"); } else if (num2 % 5 == 0) { printf("Buzz"); } else { printf("%s", N); } }