比赛
haohao_____
这个作者很懒,什么都没留下…
展开
-
A - Divisibility
Find the number of k-divisible numbers on the segment [a, b]. In other words you need to find the number of such integer values x that a ≤ x ≤ b and x is divisible by k. Input The only line原创 2017-07-29 17:36:57 · 237 阅读 · 0 评论 -
B - Tricky Sum
In this problem you are to calculate the sum of all integers from 1 to n, but you should take all powers of two with minus in the sum. For example, for n = 4 the sum is equal to - 1 - 2 + 3 - 4 = -原创 2017-07-29 17:39:55 · 219 阅读 · 0 评论 -
C - Patrick and Shopping
今天 Patrick 等待着他的朋友 Spongebob 来他家玩。为了迎接 Spongebob,Patrick 需要去他家附近的两家商店 买一些吃的。他家离第一家商店有d1米远,离第二家商店有d2米远。还有,两家商店之间的距离是d3,帮Patrick计算去两家商店然后回家的最短距离。 Patrick 永远从他家出发,他不介意重复经过同一个地点或者同一条路,唯一的目标就是:最小化经过两间商原创 2017-07-29 17:41:28 · 187 阅读 · 0 评论