Submission #19734216
Source Code Expand
N, M = map(int, input().split())
balls = [0] * N + [1] * M
ans = 0
for j in range(N + M):
for i in range(j):
x = balls[i] + balls[j]
if x % 2 == 0:
ans += 1
print(ans)
Submission Info
| Submission Time | |
|---|---|
| Task | A - The Number of Even Pairs |
| User | maspy |
| Language | Python (3.8.2) |
| Score | 100 |
| Code Size | 199 Byte |
| Status | AC |
| Exec Time | 30 ms |
| Memory | 9052 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 | 18 ms | 8840 KiB |
| 00_sample_02.txt | AC | 23 ms | 9052 KiB |
| 00_sample_03.txt | AC | 18 ms | 8940 KiB |
| 00_sample_04.txt | AC | 20 ms | 8936 KiB |
| 00_sample_05.txt | AC | 23 ms | 8940 KiB |
| hand.txt | AC | 30 ms | 8948 KiB |
| max.txt | AC | 22 ms | 8840 KiB |
| rand_01.txt | AC | 23 ms | 8836 KiB |
| rand_02.txt | AC | 28 ms | 8844 KiB |
| rand_03.txt | AC | 19 ms | 8836 KiB |
| rand_04.txt | AC | 18 ms | 8996 KiB |
| rand_05.txt | AC | 18 ms | 9024 KiB |