結果
問題 |
No.316 もっと刺激的なFizzBuzzをください
|
ユーザー |
![]() |
提出日時 | 2025-03-28 14:49:13 |
言語 | C (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 293 bytes |
コンパイル時間 | 184 ms |
コンパイル使用メモリ | 25,472 KB |
実行使用メモリ | 16,184 KB |
最終ジャッジ日時 | 2025-03-28 14:49:19 |
合計ジャッジ時間 | 5,121 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 4 |
other | TLE * 1 -- * 32 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:5:13: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘long int *’ [-Wformat=] 5 | scanf("%d",&n); | ~^ ~~ | | | | | long int * | int * | %ld main.c:5:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%d",&n); | ^~~~~~~~~~~~~~ main.c:7:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d %d %d",&a,&b,&c); | ^~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> void main(void) { long int n = 0 ; scanf("%d",&n); int a,b,c; scanf("%d %d %d",&a,&b,&c); int count = 0; for(long int i = 1 ; i <= n ; i++){ if(i%c == 0 || i%b == 0 || i%a == 0){ count++; } } printf("%d",count); }