結果
問題 | No.221 犯罪都市 |
ユーザー |
![]() |
提出日時 | 2015-09-18 20:12:06 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 437 bytes |
コンパイル時間 | 1,246 ms |
コンパイル使用メモリ | 58,720 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-25 02:48:01 |
合計ジャッジ時間 | 1,609 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:27:15: warning: use of ‘ll’ length modifier with ‘f’ type character has either no effect or undefined behavior [-Wformat=] 27 | printf("%llf\n",citizen/all*100); | ^
ソースコード
#include <iostream> using namespace std; #include <cstdio> #include <string.h> #include <stdlib.h> #include <math.h> typedef long long ll; typedef long double lb; int l[3]; int main(void) { int i,j,k,l; int memory[2]; int n; lb criminal,citizen; lb all; cin >> n; criminal = n*(long double)0.99; citizen = (10000-n)*0.01; all = criminal + citizen; printf("%llf\n",citizen/all*100); return 0; }