ENG  RUS Timus Online Judge
Online Judge
Problems
Authors
Online contests
Site news
Webboard
Problem set
Submit solution
Judge status
Guide
Register
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

## Discussion of Problem 1726. Visits

for wa#10
Posted by vahan 14 Aug 2012 23:40
I had int n,i; and I had wa #10, then I changed them to long long and got ac, but I can't understand why I got wa10 with int n,i; where i and n can't exceed 10^6.
Re: for wa#10
Posted by MOPDOBOPOT (USU) 29 Aug 2012 23:51
Same thing :(
Re: for wa#10
Posted by vtalgo14_boogakov 6 May 2014 12:00
It's obviously a mistake in task's text. Program won't be accepted until it will work with n=10e6.
Re: for wa#10
Posted by esbybb 12 Sep 2015 11:31
thanks for your hint, helped me to get accepted verdict
Re: for wa#10
Posted by LaVuna [NULP] 31 Oct 2020 16:45
When you divide at the end by n*(n - 1) it gets overflow so you need to have type long long

Edited by author 31.10.2020 16:46

Edited by author 31.10.2020 16:46
Re: for wa#10
Posted by hduads2020_19322111 5 Apr 2021 18:00
You need long long n.
Because you divide at the end by n*(n - 1),n*(n-1) is overflow.