| ||||||||||
| 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 | |||||||||
一个奇怪的现象!我这是有两个程序:
在我机子上输入
76 89
第一个程序运行如下: 第二个程序运行如下:
1/1 1/1
2/3 3/4
3/4 4/5
4/5 5/6
7/9 6/7
24/31 23/27
31/40 29/34
38/49 35/41
41/48
76/89
很显然第一个程序的结果是错的,不应该有2/3这一项。
因为 76/89 = 0.8539 1/1 = 1 2/3 = 0.6667
所以(1/1 - 76/89) < (76/89 - 2/3)
也就是说1/1 这项比2/3这项更接近76/89 所以2/3这项是错的,
而第二个程序运行我不敢说一定对的,但我还没看出有什么错误。
奇怪就奇怪第一个程序AC了,可第二个程序WA了
这是怎么回事啊!
我的机子上装的的VC6.0.
这两个程序都是用C+提交的
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator