結果
| 問題 | No.316 もっと刺激的なFizzBuzzをください |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-13 21:40:44 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 447 bytes |
| 記録 | |
| コンパイル時間 | 610 ms |
| コンパイル使用メモリ | 81,864 KB |
| 実行使用メモリ | 19,648 KB |
| 最終ジャッジ日時 | 2026-05-29 12:55:40 |
| 合計ジャッジ時間 | 5,225 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 4 |
| other | TLE * 1 -- * 32 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
int count = 0;
vector<int> v;
string temp;
cin >> n;
for (int i = 0; i < 2 ;i++) {
getline(cin, temp, ' ');
v.push_back(stoi(temp));
}
getline(cin, temp);
v.push_back(stoi(temp));
for (int i = 1; i <= n; i++) {
if (i % v[0] == 0) count++;
else if (i % v[1] == 0) count++;
else if (i % v[2] == 0) count++;
}
cout << count;
}