結果
問題 | No.736 約比 |
ユーザー |
![]() |
提出日時 | 2018-10-02 10:42:17 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 71 ms / 2,000 ms |
コード長 | 336 bytes |
コンパイル時間 | 1,572 ms |
コンパイル使用メモリ | 193,112 KB |
最終ジャッジ日時 | 2025-01-06 14:13:47 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 65 |
ソースコード
#include <bits/stdc++.h> using ll = long long; using namespace std; int main() { int n; ll a[105]; ll g = 0; cin >> n; for (int i = 0; i < n; ++i) { cin >> a[i]; g = gcd(g, a[i]); } for (int i = 0; i < n; ++i) { a[i] /= g; cout << a[i] << (i+1 < n ? ':' : '\n'); } }