結果

問題 No.338 アンケート機能
ユーザー htensaihtensai
提出日時 2019-12-18 11:41:23
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 790 bytes
コンパイル時間 2,011 ms
コンパイル使用メモリ 71,412 KB
実行使用メモリ 49,900 KB
最終ジャッジ日時 2023-09-20 08:14:05
合計ジャッジ時間 5,059 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
49,796 KB
testcase_01 AC 43 ms
49,900 KB
testcase_02 AC 42 ms
49,436 KB
testcase_03 AC 41 ms
49,356 KB
testcase_04 AC 42 ms
49,200 KB
testcase_05 WA -
testcase_06 AC 41 ms
49,212 KB
testcase_07 WA -
testcase_08 AC 42 ms
49,412 KB
testcase_09 WA -
testcase_10 AC 40 ms
49,600 KB
testcase_11 AC 41 ms
49,568 KB
testcase_12 AC 41 ms
49,892 KB
testcase_13 AC 40 ms
49,688 KB
testcase_14 AC 40 ms
49,196 KB
testcase_15 AC 40 ms
49,436 KB
testcase_16 AC 41 ms
49,404 KB
testcase_17 AC 42 ms
49,244 KB
testcase_18 AC 42 ms
49,248 KB
testcase_19 AC 41 ms
49,192 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 41 ms
49,308 KB
testcase_24 AC 42 ms
49,312 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 42 ms
49,412 KB
testcase_29 AC 41 ms
49,312 KB
testcase_30 AC 41 ms
49,412 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 <= 100; i++) {
            for (int j = 0; j <= 100; j++) {
                if (i == 0 && j == 0) {
                    continue;
                }
                if ((100 * i + (i + j) / 2) / (i + j) == a && (100 * j + (i + j) / 2) / (i + j) == b) {
                    min = Math.min(min, i + j);
                }
            }
        }
        System.out.println(min);
    }
}
0