Submission #6068586


Source Code Expand

Copy
N, L = map(int, input().split())
Sum = 0
Eaten = 114514

for i in range(N):
    if abs(Eaten) > abs(L + i):
        Eaten = L + i
    Sum = Sum + L + i

Sum = Sum - Eaten
print(Sum)

Submission Info

Submission Time
Task B - Bite Eating
User keisan114514
Language Python3 (3.4.3)
Score 200
Code Size 193 Byte
Status
Exec Time 17 ms
Memory 2940 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 s1.txt, s2.txt, s3.txt
All 200 / 200 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, s1.txt, s2.txt, s3.txt
Case Name Status Exec Time Memory
01.txt 17 ms 2940 KB
02.txt 17 ms 2940 KB
03.txt 17 ms 2940 KB
04.txt 16 ms 2940 KB
05.txt 17 ms 2940 KB
06.txt 17 ms 2940 KB
07.txt 17 ms 2940 KB
08.txt 17 ms 2940 KB
09.txt 17 ms 2940 KB
10.txt 17 ms 2940 KB
11.txt 17 ms 2940 KB
12.txt 17 ms 2940 KB
s1.txt 17 ms 2940 KB
s2.txt 17 ms 2940 KB
s3.txt 17 ms 2940 KB