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 1209. 1, 10, 100, 1000...

What about differences between C&Pascal
Posted by Muad Dib 7 Oct 2010 22:46
When I wrote solution of this problem in C, I have got WA#3. Main idea - number (K*8-7) must be square of some natural number. I used fabs(sqrt(..)-(int)sqrt(..))<=EPS and other variants, but.. without success.

In Pascal I used frac(sqrt(..)) and have got AC.
Why? What should I do to solve problem in C?
Re: What about differences between C&Pascal
Posted by sklyack 26 Aug 2011 02:09
Calc 8*k-7 in long long...