Submission #6490584


Source Code Expand

Copy
from math import ceil, sqrt
S = int(input())
x1, y1 = 0, 0
y2 = 0
x3 = 0
if S <= 10**9:
    x2, y2 = S, 0
    x3, y3 = 0, 1
else:
    sq_s = ceil(sqrt(S))
    x2, y2 = sq_s*sq_s - S, sq_s
    x3, y3 = sq_s, 1

print(x1, y1, x2, y2, x3, y3)

Submission Info

Submission Time
Task A - Triangle
User marble0117
Language Python (3.4.3)
Score 400
Code Size 254 Byte
Status AC
Exec Time 17 ms
Memory 3060 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 400 / 400
Status
AC × 3
AC × 16
Set Name Test Cases
Sample sample-01.txt, sample-02.txt, sample-03.txt
All 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, 01-11.txt, 01-12.txt, 01-13.txt, sample-01.txt, sample-02.txt, sample-03.txt
Case Name Status Exec Time Memory
01-01.txt AC 17 ms 3060 KB
01-02.txt AC 17 ms 3060 KB
01-03.txt AC 17 ms 3060 KB
01-04.txt AC 17 ms 3060 KB
01-05.txt AC 17 ms 3060 KB
01-06.txt AC 17 ms 3060 KB
01-07.txt AC 17 ms 3060 KB
01-08.txt AC 17 ms 3060 KB
01-09.txt AC 17 ms 3060 KB
01-10.txt AC 17 ms 3060 KB
01-11.txt AC 17 ms 3060 KB
01-12.txt AC 17 ms 3060 KB
01-13.txt AC 17 ms 3060 KB
sample-01.txt AC 17 ms 3060 KB
sample-02.txt AC 17 ms 3060 KB
sample-03.txt AC 17 ms 3060 KB