Skip to content

Instantly share code, notes, and snippets.

@Patlatus
Created April 8, 2018 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Patlatus/f2f003864251549d3ba6f63cc2a09239 to your computer and use it in GitHub Desktop.
Save Patlatus/f2f003864251549d3ba6f63cc2a09239 to your computer and use it in GitHub Desktop.
My try to problem D of Google Code Jame QR 2018
import sys, copy;
import math;
def solve(a):
alpha = math.asin(a*a-1)/2;
print alpha
print math.cos(alpha)/2
print math.sin(alpha)/2
print -math.cos(alpha)/2, math.sin(alpha)/2, .5
print -math.sin(alpha)/2, -math.cos(alpha)/2, .5
print 0, 0, .5
t = int(raw_input())
for i in range(1, t + 1):
a = float(raw_input())
print "Case #" + str(i) + ": " ;
solve(a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment