Submission #48368056


Source Code Expand

import os
import sys

sys.setrecursionlimit(210000)


if os.getenv('TEST'):
    def eprint(*args, **kwargs):
        print('[\033[31mEPRINT\033[0m]', *args, file=sys.stderr, **kwargs)
else:
    def eprint(*args, **kwargs):
        pass


def main() -> None:
    N, S, K = map(int, input().split())
    amount = 0
    for _ in range(N):
        p, q = map(int, input().split())
        amount += p * q

    if amount < S:
        amount += K

    print(amount)


if __name__ == '__main__':
    main()

Submission Info

Submission Time
Task A - Online Shopping
User takedarts
Language Python (PyPy 3.10-v7.3.12)
Score 100
Code Size 500 Byte
Status AC
Exec Time 57 ms
Memory 76688 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 26
Set Name Test Cases
Sample example_00.txt, example_01.txt, example_02.txt
All example_00.txt, example_01.txt, example_02.txt, hand_00.txt, hand_01.txt, hand_02.txt, random_00.txt, 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, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt
Case Name Status Exec Time Memory
example_00.txt AC 55 ms 76308 KiB
example_01.txt AC 55 ms 76296 KiB
example_02.txt AC 54 ms 76432 KiB
hand_00.txt AC 55 ms 76380 KiB
hand_01.txt AC 55 ms 76484 KiB
hand_02.txt AC 57 ms 76564 KiB
random_00.txt AC 55 ms 76272 KiB
random_01.txt AC 55 ms 76324 KiB
random_02.txt AC 55 ms 76312 KiB
random_03.txt AC 54 ms 76392 KiB
random_04.txt AC 55 ms 76588 KiB
random_05.txt AC 54 ms 76348 KiB
random_06.txt AC 55 ms 76616 KiB
random_07.txt AC 54 ms 76688 KiB
random_08.txt AC 54 ms 76488 KiB
random_09.txt AC 57 ms 76236 KiB
random_10.txt AC 55 ms 76604 KiB
random_11.txt AC 55 ms 76304 KiB
random_12.txt AC 55 ms 76288 KiB
random_13.txt AC 55 ms 76428 KiB
random_14.txt AC 55 ms 76364 KiB
random_15.txt AC 54 ms 76536 KiB
random_16.txt AC 55 ms 76464 KiB
random_17.txt AC 55 ms 76180 KiB
random_18.txt AC 55 ms 76572 KiB
random_19.txt AC 54 ms 76560 KiB