ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1020. Rope

About Digit Pi
Posted by Ivan Dermansky 3 Oct 2008 17:23
Hello! Sorry for my language. I have not found in C++ (Microsoft Visual Studio 2008) function for digit Pi, and input it self - "float Pi=3.1415926" and i recived WA in test 3, but when i use Pi=3.141_!6!_926 (It's wrong!) I got Accepted! What you think about this?
Re: About Digit Pi
Posted by [SPbSU ITMO] WiNGeR 4 Oct 2008 03:10
you can use acos(-1.0)
but it's exist
Posted by dibrov.bor[SumySU] 5 Oct 2008 11:08
you can find const M_PI in <math.h>
Re: but it's exist
Posted by Raymond Martineau 16 Jan 2009 04:48
M_PI is not defined under Ansi C or the judge.
Re: but it's exist
Posted by OpenGL 16 Jan 2009 19:02
if you write

#define _USE_MATH_DEFINES
#include <math.h>

then you can use M_PI