Submission #13343715


Source Code Expand

Copy
import sys
from math import cos, sin, pi

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

A, B, H, M = map(int, read().split())

H += M / 60

t1 = 2 * pi * H / 12
t2 = 2 * pi * H

z1 = A * complex(cos(t1), sin(t1))
z2 = B * complex(cos(t2), sin(t2))

print(abs(z1 - z2))

Submission Info

Submission Time
Task C - : (Colon)
User maspy
Language Python (3.8.2)
Score 300
Code Size 345 Byte
Status AC
Exec Time 24 ms
Memory 9576 KB

Judge Result

Set Name Sample Subtask1
Score / Max Score 0 / 0 300 / 300
Status
AC × 2
AC × 30
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
Subtask1 sample_01.txt, sample_02.txt, sub1_01.txt, sub1_02.txt, sub1_03.txt, sub1_04.txt, sub1_05.txt, sub1_06.txt, sub1_07.txt, sub1_08.txt, sub1_09.txt, sub1_10.txt, sub1_11.txt, sub1_12.txt, sub1_13.txt, sub1_14.txt, sub1_15.txt, sub1_16.txt, sub1_17.txt, sub1_18.txt, sub1_19.txt, sub1_20.txt, sub1_21.txt, sub1_22.txt, sub1_23.txt, sub1_24.txt, sub1_25.txt, sub1_26.txt, sub1_27.txt, sub1_28.txt
Case Name Status Exec Time Memory
sample_01.txt AC 24 ms 9452 KB
sample_02.txt AC 18 ms 9508 KB
sub1_01.txt AC 16 ms 9224 KB
sub1_02.txt AC 16 ms 9220 KB
sub1_03.txt AC 17 ms 9380 KB
sub1_04.txt AC 20 ms 9576 KB
sub1_05.txt AC 18 ms 9444 KB
sub1_06.txt AC 17 ms 9128 KB
sub1_07.txt AC 18 ms 9380 KB
sub1_08.txt AC 16 ms 9444 KB
sub1_09.txt AC 16 ms 9512 KB
sub1_10.txt AC 17 ms 9512 KB
sub1_11.txt AC 15 ms 9376 KB
sub1_12.txt AC 18 ms 9452 KB
sub1_13.txt AC 16 ms 9376 KB
sub1_14.txt AC 18 ms 9224 KB
sub1_15.txt AC 16 ms 9512 KB
sub1_16.txt AC 17 ms 9220 KB
sub1_17.txt AC 17 ms 9160 KB
sub1_18.txt AC 17 ms 9448 KB
sub1_19.txt AC 19 ms 9456 KB
sub1_20.txt AC 18 ms 9396 KB
sub1_21.txt AC 15 ms 9380 KB
sub1_22.txt AC 16 ms 9016 KB
sub1_23.txt AC 19 ms 9228 KB
sub1_24.txt AC 17 ms 9512 KB
sub1_25.txt AC 18 ms 9224 KB
sub1_26.txt AC 16 ms 9384 KB
sub1_27.txt AC 17 ms 9224 KB
sub1_28.txt AC 16 ms 9508 KB