Description My girlfriend loves 7 very much, she thinks it is lucky! If an integer contains one or more 7, she will think it is lucky too! Input The first line has one integer T (1 <= T <= 100), means there are T test cases. For each test case, t…
Description Given a positive integer n, find two non-negative integers a, b such that a2 + b2 = n. Input The first line contains the number of test cases T (1 <= T <= 1000). For each test case, there is only one line with an integer n (1 <= n <…
Prime Ring Problem Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 23458 Accepted Submission(s): 10465 Problem Description A ring is compose of n circles as shown in diagram. Put natural numb…
1325: A very hard problem Time Limit: 3 Sec Memory Limit: 160 MBSubmit: 203 Solved: 53[Submit][Status][Web Board] Description CX老湿经常被人黑,被黑得多了,自己也就麻木了.于是经常听到有人黑他,他都会深情地说一句:禽兽啊! 一天CX老湿突发奇想,给大家出了一个难题,并且声称谁能够准确地回答出问题才能继续黑他,否则他就要反击了. 这个难题就是: 给出两个数p和q,接下…