Commit 3619491b authored by Roshan Rabinarayan's avatar Roshan Rabinarayan

added solution to q7

parent 5b8599d3
import sys
f= open(sys.argv[1],"r")
testcases=int(f.readline())
while testcases>0:
testcases-=1
line =f.readline()
line =line.split(" ")
hour=int(line[0])
minutes=int(line[1])
seconds=int(line[2])
a=int(line[3])
b=int(line[4])
c=int(line[5])
hourdegree= 360/hour
minutedegree =360/hour/minutes
b+=(c)/seconds
angle=abs((a*hourdegree +b*minutedegree) -(360/minutes)*b)
print(round(min(360-angle,angle),2))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment