結果
| 問題 |
No.9002 FizzBuzz(テスト用)
|
| ユーザー |
Drakkon
|
| 提出日時 | 2018-02-04 01:56:31 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 274 bytes |
| コンパイル時間 | 267 ms |
| コンパイル使用メモリ | 28,544 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-23 02:19:50 |
| 合計ジャッジ時間 | 1,414 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 4 |
コンパイルメッセージ
main.c: In function 'main':
main.c:9:16: warning: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
9 | printf('\n');
| ^~~~
| |
| int
In file included from main.c:1:
/usr/include/stdio.h:356:43: note: expected 'const char * restrict' but argument is of type 'int'
356 | extern int printf (const char *__restrict __format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
ソースコード
#include <stdio.h>
int main(void){
int N, i;
scanf("%d", &N);
for(i = 1; i <= N; i++){
if(i % 3 == 0) printf("Fizz");
if(i % 5 == 0) printf("Buzz");
if(i % 3 != 0 && i % 5 != 0) printf("%d", i);
printf('\n');
}
return 0;
}
Drakkon