朱色虫居
Pages
Home
Featured Posts
2006/10/09
10286-Trouble with a Pentagon
<br /> /* <br /> "Trouble with a Pentagon"<br /> Level:1.5<br /> Date:2006/10/8<br /> 技巧: sin(108)/sin(63)*F<br /> http://ken.duisenberg.com/potw/archive/arch98/981113sol.html <br /> 參數是弳度,<br /> 要用double,float會WA. <br /> */<br /> #include <stdio.h><br /> #include <math.h><br /> #define pi 3.1415926535897932384626433832795<br /> main(){<br /> double input=0.0;<br /> while(scanf("%lf",&input)==1){<br /> printf("%.10lf\n",sin(108*pi/180.0)/sin(63*pi/180.0)*input); <br /> } <br /> }<br />
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment