結果
問題 | No.339 何人が回答したのか |
ユーザー |
![]() |
提出日時 | 2018-01-18 22:04:25 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 854 bytes |
コンパイル時間 | 1,788 ms |
コンパイル使用メモリ | 158,772 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-24 11:26:34 |
合計ジャッジ時間 | 3,397 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 61 |
ソースコード
#include <bits/stdc++.h> #include <iostream> #include <iomanip> #include <vector> #include <algorithm> #include <string> #include <sstream> #include <cmath> #include <stack> #include <queue> #include <cctype> #include <stdio.h> #include <map> #include <string.h> #include <utility> typedef long long ll; using namespace std; typedef pair<int, int> P; double rate[101]; int main() { double n = 0; cin >> n; for (int i = 0; i < n; i++) { double tmp = 0; cin >> tmp; rate[i] = tmp; } bool judge=true; for (double i = n; i <= 100; i++) { judge =true; for (int j = 0; j < n; j++) { double tmp =rate[j] * i/100; if (ceil(tmp) != floor(tmp)) { judge =false; /* cout<<"i"<<i<<" "<<tmp<<endl; cout<<ceil(tmp)<<" "<<floor(tmp)<<endl;*/ break; } } if(judge){ cout<<i<<endl; break; } } return 0; }