結果

問題 No.338 アンケート機能
ユーザー treeonetreeone
提出日時 2016-03-06 17:36:07
言語 C++11
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 808 bytes
コンパイル時間 586 ms
コンパイル使用メモリ 74,020 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-24 14:47:03
合計ジャッジ時間 1,469 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
#include <map>
#include <set>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <stack>
#include <queue>
#include <utility>
#define rep(i,l,n) for(lint i=l;i<n;i++)
#define rer(i,l,n) for(lint i=l;i<=n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define fi first
#define se second
using namespace std;
typedef long long lint;
typedef vector<int> vi;
typedef vector<lint> vli;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

int main(){
	int A,B,ans=0;
	cin>>A>>B;
	rep(i,0,110){
		rep(j,0,110){
			double x,y,a=(double)i,b=(double)j;
			x=100.0*a/(a+b);
			y=100.0*b/(a+b);
			if((int)(x+0.5)==A && (int)(y+0.5)==B){
				ans=i+j;
				i=110;
				j=110;
			}
		}
	}
	o(ans);
}
0