結果
問題 |
No.3073 Fraction Median
|
ユーザー |
|
提出日時 | 2025-03-21 23:17:56 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 374 bytes |
コンパイル時間 | 2,100 ms |
コンパイル使用メモリ | 198,424 KB |
実行使用メモリ | 13,344 KB |
最終ジャッジ日時 | 2025-03-21 23:18:09 |
合計ジャッジ時間 | 8,628 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge7 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 5 WA * 13 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); int n,t; vector <int> v; cin >> n; for(int i=0;i<n;i++) { cin >> t; v.push_back(t); } sort(v.rbegin(),v.rend()); int g = __gcd(v[0],v[1]); cout << v[1]/g << ' ' << v[0]/g << '\n'; return 0; }