結果

問題 No.442 和と積
ユーザー KKT89
提出日時 2020-03-19 12:02:41
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 1,000 ms
コード長 288 bytes
コンパイル時間 4,088 ms
コンパイル使用メモリ 77,216 KB
最終ジャッジ日時 2025-01-09 07:51:40
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <queue>
using namespace std;
typedef long long int ll;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(0);
    ll a,b; cin >> a >> b;
    ll g=__gcd(a,b);
    cout << g*__gcd((a/g+b/g),g) << endl;
}
0