結果

問題 No.338 アンケート機能
ユーザー kenji_shioyakenji_shioya
提出日時 2016-06-24 06:53:04
言語 Java19
(openjdk 21)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 483 bytes
コンパイル時間 6,036 ms
コンパイル使用メモリ 71,192 KB
実行使用メモリ 56,268 KB
最終ジャッジ日時 2023-08-07 21:49:50
合計ジャッジ時間 10,676 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
39,864 KB
testcase_01 AC 123 ms
39,280 KB
testcase_02 AC 125 ms
40,136 KB
testcase_03 AC 124 ms
39,320 KB
testcase_04 AC 123 ms
39,212 KB
testcase_05 AC 122 ms
39,108 KB
testcase_06 AC 125 ms
39,156 KB
testcase_07 AC 126 ms
39,788 KB
testcase_08 AC 125 ms
39,492 KB
testcase_09 AC 129 ms
39,128 KB
testcase_10 AC 123 ms
39,428 KB
testcase_11 AC 122 ms
39,328 KB
testcase_12 AC 124 ms
39,340 KB
testcase_13 AC 123 ms
39,312 KB
testcase_14 AC 121 ms
39,276 KB
testcase_15 AC 121 ms
39,644 KB
testcase_16 AC 122 ms
39,372 KB
testcase_17 AC 123 ms
39,896 KB
testcase_18 AC 121 ms
39,180 KB
testcase_19 AC 120 ms
39,288 KB
testcase_20 AC 122 ms
39,188 KB
testcase_21 AC 122 ms
39,368 KB
testcase_22 AC 124 ms
39,716 KB
testcase_23 AC 124 ms
39,656 KB
testcase_24 AC 122 ms
39,152 KB
testcase_25 AC 120 ms
39,760 KB
testcase_26 AC 120 ms
39,548 KB
testcase_27 AC 130 ms
39,452 KB
testcase_28 AC 126 ms
55,688 KB
testcase_29 AC 124 ms
56,268 KB
testcase_30 AC 124 ms
55,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Exercise119{
  public static void main (String[] args){

    Scanner sc = new Scanner(System.in);

    int ca = sc.nextInt();
    int cb = sc.nextInt();
    int min = 200;
    for(double i = 0; i < 200; i++){
      for(double j = 0; j < 200; j++){
        if(ca == (int)Math.round(i * 100 / (i + j)) && cb == (int)Math.round(j * 100 / (i + j))){
          min = Math.min(min, (int)(i + j));
        }
      }
    }
    System.out.println(min);
  }
}
0