Submission #17793713


Source Code Expand

gets
p$<.sum{|ln|
	a,b = ln.split.map(&:to_i)
	(b-a+1)*(b-a+2)/2+(b-a+1)*(a-1)
}

Submission Info

Submission Time
Task B - Trapezoid Sum
User ds14050
Language Ruby (2.7.1)
Score 200
Code Size 86 Byte
Status AC
Exec Time 131 ms
Memory 14360 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 13
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
random_01.txt AC 62 ms 14088 KiB
random_02.txt AC 61 ms 14168 KiB
random_03.txt AC 58 ms 14084 KiB
random_04.txt AC 61 ms 14096 KiB
random_05.txt AC 61 ms 14252 KiB
random_06.txt AC 59 ms 14220 KiB
random_07.txt AC 63 ms 14236 KiB
random_08.txt AC 77 ms 14360 KiB
random_09.txt AC 90 ms 14200 KiB
random_10.txt AC 131 ms 14108 KiB
sample_01.txt AC 60 ms 14220 KiB
sample_02.txt AC 55 ms 13980 KiB
sample_03.txt AC 60 ms 14264 KiB