結果
| 問題 | No.316 もっと刺激的なFizzBuzzをください |
| コンテスト | |
| ユーザー |
sasa
|
| 提出日時 | 2025-03-19 13:58:59 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 325 bytes |
| コンパイル時間 | 230 ms |
| コンパイル使用メモリ | 27,520 KB |
| 実行使用メモリ | 16,184 KB |
| 最終ジャッジ日時 | 2025-03-19 13:59:05 |
| 合計ジャッジ時間 | 5,256 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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);
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);
}
sasa