結果
問題 | No.736 約比 |
ユーザー |
|
提出日時 | 2019-01-02 20:45:48 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 381 bytes |
コンパイル時間 | 1,578 ms |
コンパイル使用メモリ | 167,636 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-21 16:13:48 |
合計ジャッジ時間 | 3,094 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 65 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector<long long> a(n); for(int i = 0; i < n; i++) { cin >> a[i]; } long long g = a[0]; for(int i = 0; i < n; i++) { g = __gcd(g, a[i]); } for(int i = 0; i < n; i++) { if(i > 0) cout << ":"; cout << a[i] / g; } cout << '\n'; return 0; }