結果

問題 No.415 ぴょん
ユーザー KKT89
提出日時 2020-10-14 20:26:58
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 220 bytes
コンパイル時間 1,950 ms
コンパイル使用メモリ 192,816 KB
最終ジャッジ日時 2025-01-15 07:18:07
ジャッジサーバーID
(参考情報)
judge3 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    ll n,d; cin >> n >> d;
    ll l=n*d/__gcd(n,d);
    cout << l/d-1 << endl;
}
0