Submission #982501


Source Code Expand

import java.util.*;

class Main {
        public static void main(String args[]) {
                try (Scanner sc = new Scanner(System.in)) {
                        double p = sc.nextDouble();
                        long n = sc.nextLong();
                        double ans = (1.0 + Math.pow(2.0 * p - 1.0, n)) / 2.0;
                        if (n % 2 == 0) {
                                ans = 1 - ans;
                        }
                        System.out.printf("%.9Lf\n", ans);
                }
        }
}

Submission Info

Submission Time
Task A - eject
User goryudyuma
Language Java (OpenJDK 1.7.0)
Score 0
Code Size 539 Byte
Status RE
Exec Time 268 ms
Memory 22732 KB

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
RE × 33
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 RE 254 ms 22700 KB
00-sample-01 RE 248 ms 22588 KB
10-random_small-00 RE 245 ms 22700 KB
10-random_small-01 RE 250 ms 22564 KB
10-random_small-02 RE 249 ms 22704 KB
10-random_small-03 RE 246 ms 22704 KB
10-random_small-04 RE 248 ms 22728 KB
10-random_small-05 RE 249 ms 22568 KB
10-random_small-06 RE 245 ms 22700 KB
10-random_small-07 RE 251 ms 22572 KB
10-random_small-08 RE 246 ms 22572 KB
10-random_small-09 RE 250 ms 22604 KB
20-random_large-00 RE 249 ms 22632 KB
20-random_large-01 RE 247 ms 22696 KB
20-random_large-02 RE 248 ms 22576 KB
20-random_large-03 RE 249 ms 22660 KB
20-random_large-04 RE 246 ms 22620 KB
20-random_large-05 RE 249 ms 22696 KB
20-random_large-06 RE 246 ms 22700 KB
20-random_large-07 RE 252 ms 22696 KB
20-random_large-08 RE 256 ms 22696 KB
20-random_large-09 RE 250 ms 22732 KB
30-p_zero-00 RE 251 ms 22700 KB
30-p_zero-01 RE 247 ms 22700 KB
30-p_zero-02 RE 250 ms 22696 KB
30-p_zero-03 RE 247 ms 22572 KB
30-p_zero-04 RE 248 ms 22696 KB
40-p_one-00 RE 249 ms 22564 KB
40-p_one-01 RE 251 ms 22572 KB
40-p_one-02 RE 249 ms 22668 KB
40-p_one-03 RE 247 ms 22572 KB
40-p_one-04 RE 268 ms 22588 KB
90-handmade-00 RE 248 ms 22600 KB