結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
55,844 KB
testcase_01 AC 114 ms
55,720 KB
testcase_02 AC 115 ms
56,088 KB
testcase_03 AC 116 ms
55,756 KB
testcase_04 AC 111 ms
55,932 KB
testcase_05 AC 109 ms
56,032 KB
testcase_06 AC 108 ms
55,708 KB
testcase_07 AC 109 ms
55,684 KB
testcase_08 AC 111 ms
55,940 KB
testcase_09 AC 108 ms
56,136 KB
testcase_10 AC 109 ms
55,820 KB
testcase_11 AC 111 ms
56,728 KB
testcase_12 AC 115 ms
55,996 KB
testcase_13 AC 111 ms
55,844 KB
testcase_14 AC 110 ms
55,724 KB
testcase_15 AC 111 ms
56,108 KB
testcase_16 AC 109 ms
55,448 KB
testcase_17 AC 110 ms
55,924 KB
testcase_18 AC 112 ms
55,708 KB
testcase_19 AC 112 ms
56,032 KB
testcase_20 WA -
testcase_21 AC 122 ms
55,812 KB
testcase_22 AC 114 ms
55,672 KB
testcase_23 AC 114 ms
55,688 KB
testcase_24 AC 124 ms
56,796 KB
testcase_25 AC 116 ms
56,140 KB
testcase_26 AC 110 ms
55,672 KB
testcase_27 AC 113 ms
55,496 KB
testcase_28 AC 114 ms
55,984 KB
testcase_29 AC 111 ms
56,080 KB
testcase_30 AC 112 ms
56,028 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=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