結果
| 問題 |
No.894 二種類のバス
|
| コンテスト | |
| ユーザー |
Forested
|
| 提出日時 | 2020-05-26 13:57:52 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 592 bytes |
| コンパイル時間 | 668 ms |
| コンパイル使用メモリ | 91,148 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-13 02:41:10 |
| 合計ジャッジ時間 | 1,478 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 6 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <cmath>
#include <iomanip>
#define rep(i, n) for(int i = 0; i < (int)(n); ++i)
using namespace std;
long long GCD(long long A, long long B) {if (A % B) return GCD(B, A % B); return B;}
long long LCM(long long A, long long B) {return A / GCD(A, B) * B;}
int main() {
long long T, A, B;
cin >> T >> A >> B;
cout << (T + A - 1) / A + (T + B - 1) / B - (T + LCM(A, B) - 1) / LCM(A, B) << endl;
}
Forested