結果
問題 | No.9002 FizzBuzz(テスト用) |
ユーザー |
![]() |
提出日時 | 2015-09-17 01:45:44 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 406 bytes |
コンパイル時間 | 102 ms |
コンパイル使用メモリ | 20,352 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-19 06:50:29 |
合計ジャッジ時間 | 572 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:8:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%d", &N); | ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>int main(){int N;int i = 1;scanf("%d", &N);do {if (i % 15 == 0) {puts("FizzBuzz");} else if (i % 3 == 0) {puts("Fizz");} else if (i % 5 == 0) {puts("Buzz");} else {printf("%d\n", i);}i++;} while (i <= N);return 0;}