class Solution { public: /** * @param x: An integer * @return: The sqrt of x */ int getResult(long start, long end, long target){ long temp; while(start <= end){ temp = (start + end) / ; if(start * start > target) ; if(end * end < target) return…
2016年没有参赛,在师兄的介绍下,试了一下简单的一题,需要注意的是读写数据的形式还有具体代码. 2016资格赛 A题 Problem Bleatrix Trotter the sheep has devised a strategy that helps her fall asleep faster. First, she picks a number N. Then she starts naming N, 2 × N, 3 × N, and so on. Whenever she name…
Description Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not greater than 200 and there is a corresponding m containing no mo…