結果

問題 No.221 犯罪都市
ユーザー koyoprokoyopro
提出日時 2015-09-20 22:21:27
言語 Python2
(2.7.18)
結果
AC  
実行時間 11 ms / 5,000 ms
コード長 699 bytes
コンパイル時間 455 ms
コンパイル使用メモリ 6,656 KB
実行使用メモリ 6,040 KB
最終ジャッジ日時 2023-08-26 08:53:27
合計ジャッジ時間 1,260 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
5,956 KB
testcase_01 AC 10 ms
5,880 KB
testcase_02 AC 9 ms
5,968 KB
testcase_03 AC 9 ms
5,836 KB
testcase_04 AC 10 ms
5,960 KB
testcase_05 AC 11 ms
5,920 KB
testcase_06 AC 10 ms
5,876 KB
testcase_07 AC 10 ms
5,972 KB
testcase_08 AC 8 ms
5,876 KB
testcase_09 AC 10 ms
5,968 KB
testcase_10 AC 9 ms
6,040 KB
testcase_11 AC 10 ms
5,908 KB
testcase_12 AC 10 ms
5,956 KB
testcase_13 AC 11 ms
5,956 KB
testcase_14 AC 9 ms
5,976 KB
testcase_15 AC 10 ms
5,840 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-

N, = map(int, raw_input().split())

# 都市人口に含まれる構成員の割合から、実際にいる構成員の人数と
# 一般市民の人数を出します。それぞれからどれだけの逮捕者がでるか
# 考えます。総逮捕者のうち、逮捕された一般市民の割合を求めます。

# 人口
p = 1000000

# 都市人口に含まれる構成員の割合
a = 1.0 * N / 10000

# 実際にいる構成員の人数
k = int(p * a)

# 実際にいる市民の人数
c = p - k

# 構成員からの逮捕者数
kk = int(k * 0.99)

# 市民からの逮捕者数
ck = int(c * 0.01)

# 逮捕者数中の市民の数
print 100.0 * ck / (kk + ck)
0