結果
| 問題 |
No.894 二種類のバス
|
| コンテスト | |
| ユーザー |
seriru13
|
| 提出日時 | 2019-09-29 14:19:16 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 330 bytes |
| コンパイル時間 | 1,148 ms |
| コンパイル使用メモリ | 100,356 KB |
| 最終ジャッジ日時 | 2025-01-07 19:51:57 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 6 WA * 11 |
ソースコード
#include<iostream>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<vector>
#include<map>
#include<queue>
using namespace std;
typedef long long ll;
const int MOD=1e9+7;
int main() {
ll a,b,t,ans=0,g,l;
cin >> t >> a >> b;
ans+=t/a;
ans+=t/b;
g=__gcd(a,b);
l=(a/g)*b;
ans-=t/l;
cout << ans << endl;
}
seriru13