結果
問題 | No.736 約比 |
ユーザー |
|
提出日時 | 2019-08-01 01:46:48 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 331 bytes |
コンパイル時間 | 1,961 ms |
コンパイル使用メモリ | 193,768 KB |
最終ジャッジ日時 | 2025-01-07 10:24:53 |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 65 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n; cin>>n; ll a[n]; for (int i=0; i < n; i++)cin>>a[i]; ll g=a[0]; for (int i = 1; i < n; i++) g = gcd(g, a[i]); cout<<a[0]/g; for (int i=1;i<n;i++) { cout<<':'<<a[i]/g; } puts(""); return 0; }