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 1036. Lucky Tickets

long arithmetics
Posted by buggzy (Ilya Teterin - USU) 8 Apr 2004 22:34
Is there any ways to avoid arithmetics between very long numbers?
Re: long arithmetics
Posted by Vlad Veselov 9 Apr 2004 16:08
When you calculate the element of dinamic table you must minimize amount of operations between very long numbers. The order of this numbers is sqrt(r), where r is result (then you calculate sum of squares). My solution needs 0.031 sec, 441 Kb.