Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
终于知道是哪里错了~原来,是负数的余数没处理好。 最初我想的是要把负数的余数表示为正,就得加上除数K,图简便就写成了: d=(d+k)%k; 孰不知,当d<-k时,这样的结果还是负数, 而我在自己验证数据时一直都没用过小于-k的数据,还以为都正确呢~ 惭愧,惭愧~ Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator