結果

問題 No.221 犯罪都市
ユーザー hadrori
提出日時 2015-07-28 15:37:09
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 453 bytes
コンパイル時間 2,009 ms
コンパイル使用メモリ 157,908 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-25 00:52:16
合計ジャッジ時間 2,464 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘void input()’:
main.cpp:15:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   15 |     scanf("%d", &n);
      |     ~~~~~^~~~~~~~~~

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define repi(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repi(i,0,n)

int n;
double dp[1<<20];

double solve() {
    double a = (1000000-n*100)*0.01, b = n*100*0.99;
    return a/(a+b)*100;
}

void input() {
    scanf("%d", &n);
}

int main() {
    cin.tie(0);
    ios_base::sync_with_stdio(0);
    cout << fixed << setprecision(12);
    input();
    cout << solve() << endl;
    return 0;
}
0