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 |
给使用 Pascal 的 GGMMvar x , y : longint ; begin while (not seekeof) do begin readln (x) ; if (x = 0) then break ; y := x and (-x) ; writeln (x + y + ((x xor (x + y)) div y) shr 2) ; end ; end . 这是网上那个牛逼的代码的 Pascal 版 ~ 注意 xor 的优先级跟 + - 等同,比 div 要低。。。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator