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
Exec Time 24 ms
Memory 9576 KB

Test Cases

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