본문 바로가기

math

Barbara Bennett's Wild Numbers http://acm.pku.edu.cn/JudgeOnline/problem?id=3340 Description A wild number is a string containing digits and question marks (like 36?1?8). A number X matches a wild number W if they have the same length, and every non-question mark character in X is equal to the character in the same position in W (it means that you can replace a question mark with any digit). For example, 365198 matches the wi.. 더보기
Palindrome Numbers http://acm.pku.edu.cn/JudgeOnline/problem?id=2402 Description A palindrome is a word, number, or phrase that reads the same forwards as backwards. For example, the name "anna" is a palindrome. Numbers can also be palindromes (e.g. 151 or 753357). Additionally numbers can of course be ordered in size. The first few palindrome numbers are: 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, ... The number 10 i.. 더보기
Sum of Factorials http://acm.pku.edu.cn/JudgeOnline/problem?id=1775 Description John von Neumann, b. Dec. 28, 1903, d. Feb. 8, 1957, was a Hungarian-American mathematician who made important contributions to the foundations of mathematics, logic, quantum physics,meteorology, science, computers, and game theory. He was noted for a phenomenal memory and the speed with which he absorbed ideas and solved problems. In.. 더보기
Crazy tea party http://acm.pku.edu.cn/JudgeOnline/problem?id=1455 Description n participants of > sit around the table. Each minute one pair of neighbors can change their places. Find the minimum time (in minutes) required for all participants to sit in reverse order (so that left neighbors would become right, and right - left). Input The first line is the amount of tests. Each next line contains one integer n (1 더보기
Ugly Number http://acm.pku.edu.cn/JudgeOnline/problem?id=1338 Description Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, ... shows the first 10 ugly numbers. By convention, 1 is included. Given the integer n,write a program to find and print the n'th ugly number. Input Each line of the input contains a postisive integer n (n 더보기
Center of symmetry http://acm.pku.edu.cn/JudgeOnline/problem?id=2526 Description Given is a set of n points with integer coordinates. Your task is to decide whether the set has a center of symmetry. A set of points S has the center of symmetry if there exists a point s (not necessarily in S) such that for every point p in S there exists a point q in S such that p-s = s-q. Input The first line of input contains a n.. 더보기
Ones http://acm.pku.edu.cn/JudgeOnline/problem?id=2551 Description Given any integer 0 더보기