結果
| 問題 |
No.338 アンケート機能
|
| コンテスト | |
| ユーザー |
not_522
|
| 提出日時 | 2016-11-23 14:55:58 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 1,866 bytes |
| コンパイル時間 | 1,348 ms |
| コンパイル使用メモリ | 166,348 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-27 10:19:40 |
| 合計ジャッジ時間 | 2,322 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
struct Initializer {
Initializer() {
cin.tie(0);
ios::sync_with_stdio(0);
cout << fixed << setprecision(15);
}
} initializer;
template<typename T> inline T gcd(T t) {
return t;
}
template<typename T, typename... S> inline T gcd(T t, S... s) {
return __gcd(t, gcd(s...));
}
template<typename T> inline T lcm(T t) {
return t;
}
template<typename T, typename... S> inline T lcm(T t, S... s) {
T l = lcm(s...);
return t / gcd(t, l) * l;
}
template<typename T> inline T floor(T a, T b) {
return a / b * b <= a ? a / b : a / b - 1;
}
template<> inline float floor(float a, float b) {
return floor(a / b) * b <= a ? floor(a / b) : floor(a / b) - 1;
}
template<> inline double floor(double a, double b) {
return floor(a / b) * b <= a ? floor(a / b) : floor(a / b) - 1;
}
template<> inline long double floor(long double a, long double b) {
return floor(a / b) * b <= a ? floor(a / b) : floor(a / b) - 1;
}
template<typename T> inline T ceil(T a, T b) {
return floor(a + b - 1, b);
}
template<typename T> inline T round(T a, T b) {
return floor(a + b / 2, b);
}
template<typename T> inline T mod(T a, T b) {
return a - floor(a, b) * b;
}
template<typename T> inline T factorial(T n) {
return n <= 1 ? 1 : factorial(n - 1) * n;
}
template<typename T> inline T square(T n) {
return n * n;
}
template<typename T> inline T cube(T n) {
return n * n * n;
}
template<typename T> inline T norm(T x1, T y1, T x2, T y2) {
return square(x1 - x2) + square(y1 - y2);
}
inline long long sqrt(long long n) {
return sqrt((long double)n);
}
int main() {
int a, b;
cin >> a >> b;
for (int i = 1; ; ++i) {
for (int j = 0; j <= i; ++j) {
if (a == round(100 * j, i) && b == round(100 * (i - j), i)) {
cout << i << endl;
return 0;
}
}
}
}
not_522