結果
問題 |
No.221 犯罪都市
|
ユーザー |
|
提出日時 | 2016-08-11 17:31:41 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 323 bytes |
コンパイル時間 | 248 ms |
コンパイル使用メモリ | 21,248 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-25 11:07:15 |
合計ジャッジ時間 | 889 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:4:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 4 | scanf("%f", &a); | ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(void){ float a; scanf("%f", &a); int mafia = a * 100; int citizen = 1000000 - mafia; double arrested_mafia = mafia * 0.99; double arrested_citizen = citizen * 0.01; double ans = arrested_citizen /(arrested_mafia + arrested_citizen) * 100; printf("%.12f",ans); return 0; }