結果
問題 |
No.316 もっと刺激的なFizzBuzzをください
|
ユーザー |
![]() |
提出日時 | 2025-03-28 14:36:47 |
言語 | C (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 283 bytes |
コンパイル時間 | 1,378 ms |
コンパイル使用メモリ | 24,320 KB |
実行使用メモリ | 16,304 KB |
最終ジャッジ日時 | 2025-03-28 14:36:54 |
合計ジャッジ時間 | 6,651 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 4 |
other | TLE * 1 -- * 32 |
コンパイルメッセージ
main.c: In function ‘main’: 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) { int n = 0 ; scanf("%d",&n); int a,b,c; scanf("%d %d %d",&a,&b,&c); int count = 0; for(int i = 1 ; i <= n ; i++){ if(i%c == 0 || i%b == 0 || i%a == 0){ count++; } } printf("%d",count); }