結果
| 問題 | No.894 二種類のバス |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-12-29 22:06:44 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 216 bytes |
| 記録 | |
| コンパイル時間 | 5,703 ms |
| コンパイル使用メモリ | 344,852 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-12-29 22:06:51 |
| 合計ジャッジ時間 | 5,193 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 WA * 1 |
ソースコード
#include<bits/extc++.h>
using namespace std;
using ll=long long;
int main(){
ll T,A,B;
cin>>T>>A>>B;
T--;
__int128_t N=A*B/gcd(A,B);
ll mns;
if(N>T)mns=1;
else mns=T/lcm(A,B)+1;
cout<<T/A+1+T/B+1-mns<<endl;
}