摘要:
D. Too Easy Problems D. Too Easy Problems You are preparing for an exam on scheduling theory. The exam will last for exactly T milliseconds and will c 阅读全文
摘要:
A. Modular Exponentiation The following problem is well-known: given integers n and m, calculate , where 2n = 2·2·...·2 (n factors), and denotes the r 阅读全文
摘要:
A. The Way to Home A frog lives on the axis Ox and needs to reach home which is in the point n. She starts from the point 1. The frog can jump to the 阅读全文
摘要:
A. Visiting a Friend A. Visiting a Friend Pig is visiting a friend. Pig's house is located at point 0, and his friend's house is located at point m on 阅读全文
摘要:
D. Shovel Sale There are n shovels in Polycarp's shop. The i-th shovel costs i burles, that is, the first shovel costs 1 burle, the second shovel cost 阅读全文
摘要:
A. Splitting in Teams A. Splitting in Teams There were n groups of students which came to write a training contest. A group is either one person who c 阅读全文
摘要:
if else 语句: 表达式 c = a if a > b else b: 二维列表: c = [b,a][a>b] c = (a > b and [a] or [b])[0] 输入n个数转换为list: a//b 反转:str[::-1] 阅读全文
摘要:
E. Squares and not squares Ann and Borya have n piles with candies and n is even number. There are ai candies in pile with number i. Ann likes numbers 阅读全文
摘要:
Every evening Vitalya sets n alarm clocks to wake up tomorrow. Every alarm clock rings during exactly one minute and is characterized by one integer a 阅读全文
摘要:
A. Rounding Vasya has a non-negative integer n. He wants to round it to nearest integer, which ends up with 0. If n already ends up with 0, Vasya cons 阅读全文