結果
| 問題 | No.338 アンケート機能 |
| コンテスト | |
| ユーザー |
y_mazun
|
| 提出日時 | 2016-01-29 22:31:33 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 359 ms / 2,000 ms |
| コード長 | 490 bytes |
| 記録 | |
| コンパイル時間 | 440 ms |
| コンパイル使用メモリ | 66,092 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-08 10:02:44 |
| 合計ジャッジ時間 | 12,989 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
#include <cmath>
#define REP(i,n) for(int i=0; i<(int)(n); i++)
#include <cstdio>
inline int getInt(){ int s; scanf("%d", &s); return s; }
#include <set>
using namespace std;
int main(){
const int a = getInt();
const int b = getInt();
int ans = 10000000;
REP(i,10001) REP(j,10001) if(i + j){
if((int)floor(0.5 + (100. * i) / (i + j)) == a &&
(int)floor(0.5 + (100. * j) / (i + j)) == b){
ans = min(ans, i + j);
}
}
printf("%d\n", ans);
return 0;
}
y_mazun