The reverse and add function starts with a number, reverses its digits and adds the reverse to the original. If the sum is not a palindrome (meaning it does not give the same number read from left to right and right to left), we repeat this procedure until it …

2020年1月17日 0条评论 1196点热度 0人点赞 code 阅读全文

An archaeologist, seeking proof of the presence of extraterrestrials in the Earth's past, has stumbled upon a partially destroyed wall containing strange chains of numbers. The left-hand part of these lines of digits is always intact, but unfortunately the rig…

2020年1月17日 0条评论 1652点热度 0人点赞 code 阅读全文

Children are taught to add multi-digit numbers from right to left, one digit at a time. Many find the ``carry" operation, where a 1 is carried from one digit position to the next, to be a significant challenge. Your job is to count the number of carry operatio…

2020年1月17日 0条评论 1457点热度 0人点赞 code 阅读全文

Shoemaker has N jobs (orders from customers) which he must make. Shoemaker can work on only one job in each day. For each i<sub>th</sub> job, it is known the integer T<sub>i</sub> (1&lt;=T<sub>i</sub>&lt;=1000), the …

2020年1月17日 0条评论 1858点热度 0人点赞 code 阅读全文

Football is the most popular sport in the world, even through Americans insist on calling it ``soccer." A country such as five-time World Cup-winning Brazil has so many national and regional tournaments that is it very difficult to keep track. Your task is to …

2020年1月17日 0条评论 1371点热度 0人点赞 code 阅读全文

Human programming contest judges are known to be very picky. To eliminate the need for them, write an automated judge script to judge submitted solution runs. Your program should take a file containing the correct output as well as the output of submitted prog…

2020年1月17日 0条评论 2046点热度 0人点赞 code 阅读全文