結果
問題 | No.736 約比 |
ユーザー |
![]() |
提出日時 | 2020-02-26 23:21:20 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 406 bytes |
コンパイル時間 | 1,488 ms |
コンパイル使用メモリ | 168,428 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-13 15:34:51 |
合計ジャッジ時間 | 3,229 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 65 |
ソースコード
#include <bits/stdc++.h> using longlong=long long; int main(){ std::cin.tie(nullptr);std::cin.sync_with_stdio(false); int n;std::cin>>n; std::vector<longlong>a(n); longlong g=0; for(int i=0;i<n;i++){ longlong x;std::cin>>x; a.at(i)=x; g=std::__gcd(x,g); } for(int i=0;i<n;i++){ std::cout<<(i?":":"")<<a.at(i)/g; } std::cout<<std::endl; }