結果

問題 No.338 アンケート機能
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-12-09 20:26:33
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 610 bytes
コンパイル時間 3,325 ms
コンパイル使用メモリ 71,200 KB
実行使用メモリ 56,444 KB
最終ジャッジ日時 2023-08-19 05:57:40
合計ジャッジ時間 6,691 ms
ジャッジサーバーID
(参考情報)
judge9 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
56,444 KB
testcase_01 AC 114 ms
55,788 KB
testcase_02 AC 113 ms
55,924 KB
testcase_03 AC 112 ms
55,988 KB
testcase_04 AC 113 ms
56,088 KB
testcase_05 AC 112 ms
56,260 KB
testcase_06 AC 114 ms
56,324 KB
testcase_07 AC 111 ms
54,452 KB
testcase_08 AC 119 ms
55,480 KB
testcase_09 AC 116 ms
55,536 KB
testcase_10 AC 115 ms
55,788 KB
testcase_11 AC 113 ms
56,148 KB
testcase_12 AC 123 ms
56,068 KB
testcase_13 AC 112 ms
56,240 KB
testcase_14 AC 111 ms
56,444 KB
testcase_15 AC 113 ms
56,136 KB
testcase_16 AC 111 ms
56,064 KB
testcase_17 AC 111 ms
55,980 KB
testcase_18 AC 110 ms
56,016 KB
testcase_19 AC 113 ms
56,080 KB
testcase_20 WA -
testcase_21 AC 117 ms
56,076 KB
testcase_22 AC 113 ms
55,920 KB
testcase_23 AC 115 ms
56,008 KB
testcase_24 AC 115 ms
55,596 KB
testcase_25 AC 119 ms
56,340 KB
testcase_26 AC 117 ms
55,840 KB
testcase_27 AC 113 ms
56,192 KB
testcase_28 AC 113 ms
56,128 KB
testcase_29 AC 109 ms
56,164 KB
testcase_30 AC 110 ms
54,036 KB
権限があれば一括ダウンロードができます

ソースコード

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=201;
        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