結果
| 問題 |
No.736 約比
|
| コンテスト | |
| ユーザー |
kpinkcat
|
| 提出日時 | 2023-08-21 15:33:11 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 2,000 ms |
| コード長 | 492 bytes |
| コンパイル時間 | 1,038 ms |
| コンパイル使用メモリ | 106,820 KB |
| 最終ジャッジ日時 | 2025-02-16 12:03:52 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 65 |
ソースコード
#include<iostream>
#include<map>
#include<vector>
#include <algorithm>
#include<math.h>
#include <iomanip>
#include<set>
#include <numeric>
using namespace std;
int main()
{
long long n, g=0;
cin >> n;
vector<long long> v(n);
set<long> cand;
for (int i = 0; i < n; i++) cin >> v[i];
for (int i = 0; i < n; i++){
g = gcd(g, v[i]);
}
string delim = "";
for (auto x : v){
cout << delim << x/g;
delim = ":";
}
cout << endl;
}
kpinkcat