結果

問題 No.442 和と積
ユーザー Ryu
提出日時 2018-01-04 00:00:36
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 266 bytes
コンパイル時間 674 ms
コンパイル使用メモリ 64,932 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-23 02:35:13
合計ジャッジ時間 1,715 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 5 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>

using namespace std;
using ll = long long int;

ll gcd(ll a, ll b)
{
    return (b ? gcd(b, a % b) : a);
}

int main()
{
    ll A, B;
    cin >> A >> B;
    ll d = gcd(A, B);
    cout << d * gcd(A / d * B / d, d) << endl;
}
0