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 |
Re:我用公式算到是2 * a + sqrt(4 + 4 * a * a),如果不是整数就再取整加一,但是总得到WA,谁来解释下?In Reply To:我用公式算到是2 * a + sqrt(4 + 4 * a * a),如果不是整数就再取整加一,但是总得到WA,谁来解释下? Posted by:yzx at 2007-05-02 20:15:22 因为取sq=sqrt(a*a+1)或是sq=sqrt(a*a+1)+1时,(a*a+1)%sq不一定为0,而题目中数据是整数,且要被整除 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator