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 1012. K-based Numbers. Version 2

TO ADMINS
Posted by Grigor Gevorgian 30 Jun 2008 23:12
I wrote this problem with LA,it answers correct to all my tests,but gets WA2.I submitted it for 1009 and also got WA2!
Then I checked ALL POSSIBLE TESTS for 1009 ,and it answered correct to all of them!!!Just cant imagine WHY I GET WA !!!

Edited by author 01.07.2008 13:17
IMPOSSIBLE TESTS!
Posted by Grigor Gevorgian 1 Jul 2008 13:14
in my programm I added this:
if(k==1)
{cout<<0;return 0;}
if(n==1)
{cout<<k-1;return 0;}

according to problem statement,n>=2,k>=2,so this cases are impossible,but here I got WA1,when without this cases I got WA2!!
Re: IMPOSSIBLE TESTS!
Posted by Grigor Gevorgian 4 Jul 2008 20:32
OK,I found my bug (AC now),but I still dont understand why this two cases were making problems.