結果

問題 No.221 犯罪都市
ユーザー samplelpmassamplelpmas
提出日時 2017-05-11 02:47:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 5,000 ms
コード長 586 bytes
コンパイル時間 1,827 ms
コンパイル使用メモリ 71,984 KB
実行使用メモリ 56,388 KB
最終ジャッジ日時 2023-08-26 16:02:20
合計ジャッジ時間 4,570 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
56,388 KB
testcase_01 AC 115 ms
56,324 KB
testcase_02 AC 114 ms
56,072 KB
testcase_03 AC 114 ms
56,132 KB
testcase_04 AC 114 ms
55,984 KB
testcase_05 AC 113 ms
56,184 KB
testcase_06 AC 116 ms
55,528 KB
testcase_07 AC 115 ms
56,136 KB
testcase_08 AC 114 ms
55,896 KB
testcase_09 AC 115 ms
55,696 KB
testcase_10 AC 116 ms
56,052 KB
testcase_11 AC 114 ms
56,024 KB
testcase_12 AC 117 ms
55,720 KB
testcase_13 AC 119 ms
55,764 KB
testcase_14 AC 115 ms
56,164 KB
testcase_15 AC 116 ms
55,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();

        int mafia = (1_000_000 / 10_000) * N;
        int normalPeople = 1_000_000 - mafia;

        double arrestedMafia = mafia * 0.99;
        double arrestedNormalPeople = normalPeople * 0.01;

        double arrestedPeopleSum = arrestedMafia + arrestedNormalPeople;

        double mistakenArrestRate = arrestedNormalPeople / arrestedPeopleSum * 100;

        System.out.println(mistakenArrestRate);

    }

}
0