Submission #552190


Source Code Expand

if __name__ == '__main__':
    N, K = map(int, raw_input().split(" "))
    count = 0
    count += (K - 1) * (N - K) * 6
    count += ((K - 1) + (N - K)) * 3
    count += 1.
    count /= (N * N * N)
    print(count)

Submission Info

Submission Time
Task D - 乱数生成
User sz_dr
Language Python (2.7.3)
Score 100
Code Size 223 Byte
Status AC
Exec Time 63 ms
Memory 3456 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 22
Set Name Test Cases
Sample example_0.txt, example_1.txt, example_2.txt
All example_0.txt, example_1.txt, example_2.txt, handmade_0.txt, handmade_1.txt, handmade_2.txt, handmade_3.txt, handmade_4.txt, handmade_5.txt, random_0.txt, random_1.txt, random_2.txt, random_3.txt, random_4.txt, smallrand_0.txt, smallrand_1.txt, smallrand_2.txt, smallrand_3.txt, smallrand_4.txt, example_0.txt, example_1.txt, example_2.txt
Case Name Status Exec Time Memory
example_0.txt AC 61 ms 3332 KiB
example_1.txt AC 58 ms 3448 KiB
example_2.txt AC 57 ms 3448 KiB
handmade_0.txt AC 63 ms 3452 KiB
handmade_1.txt AC 58 ms 3376 KiB
handmade_2.txt AC 57 ms 3380 KiB
handmade_3.txt AC 57 ms 3440 KiB
handmade_4.txt AC 55 ms 3456 KiB
handmade_5.txt AC 58 ms 3444 KiB
random_0.txt AC 58 ms 3440 KiB
random_1.txt AC 60 ms 3368 KiB
random_2.txt AC 58 ms 3440 KiB
random_3.txt AC 59 ms 3456 KiB
random_4.txt AC 59 ms 3444 KiB
smallrand_0.txt AC 59 ms 3452 KiB
smallrand_1.txt AC 57 ms 3452 KiB
smallrand_2.txt AC 57 ms 3440 KiB
smallrand_3.txt AC 59 ms 3384 KiB
smallrand_4.txt AC 58 ms 3440 KiB