Submission #982508
Source Code Expand
import java.util.*; class Main { final public static double EPS = 0.00000000001; public static void main(String args[]) { try (Scanner sc = new Scanner(System.in)) { double p = sc.nextDouble(); double n = sc.nextDouble(); double ans = -0.5 * Math.pow(1.0 - 2.0 * p, n) + 0.5; if(p > 1-EPS) System.out.println(n%2==0?0:1.0); else System.out.printf("%.20f\n", ans); } } }
Submission Info
Submission Time | |
---|---|
Task | A - eject |
User | goryudyuma |
Language | Java (OpenJDK 1.7.0) |
Score | 0 |
Code Size | 561 Byte |
Status | WA |
Exec Time | 1048 ms |
Memory | 22572 KB |
Judge Result
Set Name | All | ||||
---|---|---|---|---|---|
Score / Max Score | 0 / 100 | ||||
Status |
|
Set Name | Test Cases |
---|---|
All | 00-sample-00, 00-sample-01, 10-random_small-00, 10-random_small-01, 10-random_small-02, 10-random_small-03, 10-random_small-04, 10-random_small-05, 10-random_small-06, 10-random_small-07, 10-random_small-08, 10-random_small-09, 20-random_large-00, 20-random_large-01, 20-random_large-02, 20-random_large-03, 20-random_large-04, 20-random_large-05, 20-random_large-06, 20-random_large-07, 20-random_large-08, 20-random_large-09, 30-p_zero-00, 30-p_zero-01, 30-p_zero-02, 30-p_zero-03, 30-p_zero-04, 40-p_one-00, 40-p_one-01, 40-p_one-02, 40-p_one-03, 40-p_one-04, 90-handmade-00 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00-sample-00 | AC | 1048 ms | 22480 KB |
00-sample-01 | AC | 249 ms | 22348 KB |
10-random_small-00 | AC | 243 ms | 22400 KB |
10-random_small-01 | AC | 245 ms | 22432 KB |
10-random_small-02 | AC | 247 ms | 22380 KB |
10-random_small-03 | AC | 248 ms | 22376 KB |
10-random_small-04 | AC | 253 ms | 22356 KB |
10-random_small-05 | AC | 263 ms | 22416 KB |
10-random_small-06 | AC | 251 ms | 22400 KB |
10-random_small-07 | AC | 252 ms | 22384 KB |
10-random_small-08 | AC | 250 ms | 22396 KB |
10-random_small-09 | AC | 247 ms | 22460 KB |
20-random_large-00 | AC | 250 ms | 22524 KB |
20-random_large-01 | AC | 243 ms | 22532 KB |
20-random_large-02 | AC | 245 ms | 22504 KB |
20-random_large-03 | AC | 246 ms | 22560 KB |
20-random_large-04 | AC | 246 ms | 22572 KB |
20-random_large-05 | AC | 247 ms | 22556 KB |
20-random_large-06 | AC | 243 ms | 22568 KB |
20-random_large-07 | AC | 245 ms | 22516 KB |
20-random_large-08 | AC | 246 ms | 22556 KB |
20-random_large-09 | AC | 245 ms | 22516 KB |
30-p_zero-00 | AC | 246 ms | 22500 KB |
30-p_zero-01 | AC | 246 ms | 22516 KB |
30-p_zero-02 | AC | 248 ms | 22532 KB |
30-p_zero-03 | AC | 244 ms | 22560 KB |
30-p_zero-04 | AC | 245 ms | 22484 KB |
40-p_one-00 | WA | 264 ms | 22188 KB |
40-p_one-01 | WA | 240 ms | 22172 KB |
40-p_one-02 | WA | 241 ms | 22060 KB |
40-p_one-03 | WA | 242 ms | 22276 KB |
40-p_one-04 | AC | 239 ms | 22308 KB |
90-handmade-00 | AC | 246 ms | 22344 KB |