結果
問題 |
No.316 もっと刺激的なFizzBuzzをください
|
ユーザー |
![]() |
提出日時 | 2025-03-19 14:00:25 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 389 bytes |
コンパイル時間 | 336 ms |
コンパイル使用メモリ | 27,648 KB |
実行使用メモリ | 16,184 KB |
最終ジャッジ日時 | 2025-03-19 14:00:30 |
合計ジャッジ時間 | 5,117 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 4 |
other | TLE * 1 -- * 32 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:5:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%lld%d%d%d",&val, &division1, &division2, &division3); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(void){ long long val; int division1, division2, division3; scanf("%lld%d%d%d",&val, &division1, &division2, &division3); printf("%lld%d%d%d\n", val, division1, division2, division3); long long count = 0; for(long long i = 1;i <= val;i ++){ if(i % division3 == 0 || i % division2 == 0 || i % division1 == 0){ count++; } } printf("%lld",count); }