結果

問題 No.338 アンケート機能
ユーザー kohaku_kohaku
提出日時 2016-12-09 20:26:10
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 610 bytes
コンパイル時間 2,523 ms
コンパイル使用メモリ 74,336 KB
実行使用メモリ 54,476 KB
最終ジャッジ日時 2024-11-28 19:45:17
合計ジャッジ時間 8,096 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int up=200;
        int min = Integer.MAX_VALUE;
        for(int i=0; i<up; i++){
            for(int j=0; j<up; j++){
                int x = (int)Math.round(i/(double)(i+j)*100);
                int y = (int)Math.round(j/(double)(i+j)*100);
                if(x==A && y==B){
                    min=Math.min(min,i+j);
                }
            }
        }
        System.out.println(min);
        
    }
}
0