結果

問題 No.442 和と積
ユーザー Pachicobue
提出日時 2017-12-31 06:18:39
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 207 bytes
コンパイル時間 591 ms
コンパイル使用メモリ 70,580 KB
最終ジャッジ日時 2025-01-05 06:48:30
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <iostream>
#include <numeric>
using namespace std;
using ll = long long;
int main()
{
ll A,B;
cin >> A >> B;
const ll g = gcd(A,B);
cout << g*gcd(g,A/g+B/g) << endl;
return 0;
}
0