結果
問題 |
No.894 二種類のバス
|
ユーザー |
![]() |
提出日時 | 2019-09-27 22:26:50 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 355 bytes |
コンパイル時間 | 1,822 ms |
コンパイル使用メモリ | 191,816 KB |
最終ジャッジ日時 | 2025-01-07 19:27:53 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 WA * 1 |
ソースコード
#include <bits/stdc++.h> #define int long long #include <numeric> using namespace std; signed main() { int T, A, B; cin >> T >> A >> B; int ans = 0; ans = (T-1LL)/A + (T-1LL)/B + 1LL; // Tぴったりを数えないので-1、0秒の時の分を+1 int kobai = lcm(A, B); kobai = (T-1)/ kobai; ans -= kobai; cout << ans << endl; }