結果
| 問題 | No.2971 無理積分 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-08-08 15:09:18 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 770 ms / 1,000 ms |
| コード長 | 209 bytes |
| 記録 | |
| コンパイル時間 | 543 ms |
| コンパイル使用メモリ | 82,660 KB |
| 実行使用メモリ | 76,672 KB |
| 最終ジャッジ日時 | 2024-08-08 15:09:48 |
| 合計ジャッジ時間 | 28,647 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 36 |
ソースコード
import random N = int(input()) M = N ** 1.5 ans = M cnt = 5000000 ok = 0 for _ in range(cnt): x, y = random.random(), M + random.random() if y <= (x ** 3 + N ** 3) ** 0.5: ok += 1 print(ans + ok / cnt)