Submission #11114151


Source Code Expand

Copy
#!/usr/bin/ python3.8
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, M = map(int, readline().split())
x = M * (M - 1) // 2
x += N * (N - 1) // 2
print(x)

Submission Info

Submission Time
Task A - The Number of Even Pairs
User maspy
Language Python3 (3.4.3)
Score 100
Code Size 237 Byte
Status
Exec Time 17 ms
Memory 2940 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, 00_sample_05.txt
All 100 / 100 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 17 ms 2940 KB
00_sample_02.txt 17 ms 2940 KB
00_sample_03.txt 17 ms 2940 KB
00_sample_04.txt 17 ms 2940 KB
00_sample_05.txt 17 ms 2940 KB
hand.txt 17 ms 2940 KB
max.txt 17 ms 2940 KB
rand_01.txt 17 ms 2940 KB
rand_02.txt 17 ms 2940 KB
rand_03.txt 17 ms 2940 KB
rand_04.txt 17 ms 2940 KB
rand_05.txt 17 ms 2940 KB