結果

問題 No.338 アンケート機能
ユーザー htensaihtensai
提出日時 2019-12-18 11:46:21
言語 Java19
(openjdk 21)
結果
AC  
実行時間 66 ms / 2,000 ms
コード長 804 bytes
コンパイル時間 2,027 ms
コンパイル使用メモリ 71,760 KB
実行使用メモリ 51,740 KB
最終ジャッジ日時 2023-09-20 08:23:53
合計ジャッジ時間 5,276 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
50,028 KB
testcase_01 AC 64 ms
50,820 KB
testcase_02 AC 64 ms
51,740 KB
testcase_03 AC 64 ms
50,332 KB
testcase_04 AC 64 ms
51,400 KB
testcase_05 AC 63 ms
51,696 KB
testcase_06 AC 66 ms
49,992 KB
testcase_07 AC 66 ms
49,968 KB
testcase_08 AC 65 ms
51,540 KB
testcase_09 AC 63 ms
50,084 KB
testcase_10 AC 65 ms
50,084 KB
testcase_11 AC 63 ms
50,380 KB
testcase_12 AC 63 ms
50,260 KB
testcase_13 AC 63 ms
50,064 KB
testcase_14 AC 66 ms
50,080 KB
testcase_15 AC 62 ms
51,412 KB
testcase_16 AC 63 ms
51,396 KB
testcase_17 AC 66 ms
50,152 KB
testcase_18 AC 63 ms
50,096 KB
testcase_19 AC 63 ms
51,500 KB
testcase_20 AC 65 ms
50,016 KB
testcase_21 AC 64 ms
51,408 KB
testcase_22 AC 63 ms
50,524 KB
testcase_23 AC 63 ms
48,544 KB
testcase_24 AC 63 ms
51,432 KB
testcase_25 AC 62 ms
50,084 KB
testcase_26 AC 63 ms
51,452 KB
testcase_27 AC 63 ms
51,372 KB
testcase_28 AC 64 ms
50,084 KB
testcase_29 AC 62 ms
50,020 KB
testcase_30 AC 63 ms
51,440 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] first = br.readLine().split(" ", 2);
        int a = Integer.parseInt(first[0]);
        int b = Integer.parseInt(first[1]);
        int min = Integer.MAX_VALUE;
        for (int i = 0; i <= 1000; i++) {
            for (int j = 0; j <= 1000; j++) {
                if (i == 0 && j == 0) {
                    continue;
                }
                if (Math.round((100 * i) / (double)(i + j)) == a && Math.round((100 * j) / (double)(i + j)) == b) {
                    min = Math.min(min, i + j);
                }
            }
        }
        System.out.println(min);
    }
}
0