Submission #11131424
Source Code Expand
import itertools N, M = map(int, input().split()) balls = [0] * N + [1] * M answer = sum((x + y) % 2 == 0 for x, y in itertools.combinations(balls, 2)) print(answer)
Submission Info
| Submission Time | |
|---|---|
| Task | A - The Number of Even Pairs |
| User | maspy |
| Language | Python (3.4.3) |
| Score | 100 |
| Code Size | 173 Byte |
| Status | AC |
| Exec Time | 20 ms |
| Memory | 3060 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, 00_sample_05.txt |
| All | 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, 00_sample_05.txt, hand.txt, max.txt, rand_01.txt, rand_02.txt, rand_03.txt, rand_04.txt, rand_05.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_01.txt | AC | 17 ms | 2940 KiB |
| 00_sample_02.txt | AC | 17 ms | 2940 KiB |
| 00_sample_03.txt | AC | 17 ms | 3060 KiB |
| 00_sample_04.txt | AC | 17 ms | 3060 KiB |
| 00_sample_05.txt | AC | 17 ms | 2940 KiB |
| hand.txt | AC | 17 ms | 3060 KiB |
| max.txt | AC | 20 ms | 3060 KiB |
| rand_01.txt | AC | 19 ms | 3060 KiB |
| rand_02.txt | AC | 18 ms | 3060 KiB |
| rand_03.txt | AC | 18 ms | 2940 KiB |
| rand_04.txt | AC | 17 ms | 3060 KiB |
| rand_05.txt | AC | 17 ms | 3060 KiB |