`
文章列表
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the 10 001st prime number?   题目大意: 前六个质数是2,3,5,7,11和13,其中第6个是13. 第10001个质数是多少? #include <stdio.h> #include <string.h> #include <ctype.h> #include <math.h> ...
The sum of the squares of the first ten natural numbers is, 12 + 22 + ... + 102 = 385 The square of the sum of the first ten natural numbers is, (1 + 2 + ... + 10)2 = 552 = 3025 Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 302 ...
The fraction 49/98 is a curious fraction, as an inexperienced mathematician in attempting to simplify it may incorrectly believe that49/98 = 4/8, which is correct, is obtained by cancelling the 9s. We shall consider fractions like, 30/50 = 3/5, to be trivial examples. There are exactly four non-t ...
Consider all integer combinations of ab for 2  a  5 and 2  b  5: 22=4, 23=8, 24=16, 25=3232=9, 33=27, 34=81, 35=24342=16, 43=64, 44=256, 45=102452=25, 53=125, 54=625, 55=3125 If they are then placed in numerical order, with any repeats removed, we get the following sequence of 15 distinct terms: ...
145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145. Find the sum of all numbers which are equal to the sum of the factorial of their digits. Note: as 1! = 1 and 2! = 2 are not sums they are not included.   题目大意: 145 是一个奇怪的数字, 因为 1! + 4! + 5! = 1 + 24 + 120 = 145. 找出所有等于各位数字阶乘之和的数字之 ...
Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows: 21 22 23 24 2520  7   8   9  1019  6   1   2  1118  5   4   3  1217 16 15 14 13 It can be verified that the sum of the numbers on the diagonals is 101. What is the sum of the numbers ...
You are given the following information, but you may prefer to do some research for yourself. 1 Jan 1900 was a Monday. Thirty days has September,April, June and November.All the rest have thirty-one,Saving February alone,Which has twenty-eight, rain or shine.And on leap years, twenty-nine. A le ...
A Pythagorean triplet is a set of three natural numbers, a  b  c, for which, a2 + b2 = c2 For example, 32 + 42 = 9 + 16 = 25 = 52. There exists exactly one Pythagorean triplet for which a + b + c = 1000.Find the product abc.   原题大意: 一个毕达哥拉斯三元组是一个包含三个
Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n).If d(a) = b and d(b) = a, where a  b, then a and b are an amicable pair and each of a and b are called amicable numbers. For example, the proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 4 ...
The nth term of the sequence of triangle numbers is given by, tn = ½n(n+1); so the first ten triangle numbers are: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ... By converting each letter in a word to a number corresponding to its alphabetical position and adding these values we form a word value. For ...
Using names.txt (right click and 'Save Link/Target As...'), a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical value for each name, multiply this value by its alphabetical position in the list to obtain a name sc ...
If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total. If all the numbers from 1 to 1000 (one thousand) inclusive were written out in words, how many letters would be used?   NOTE: Do not count spaces or hyphens. ...
215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000?   题目大意: 215 = 32768 并且其各位之和为 is 3 + 2 + 7 + 6 + 8 = 26. 21000 的各位数之和是多少?   #include <stdio.h> #include <stdbool.h> void solve(void) { int a[100000] = {0}; ...
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? #include <stdio.h> #include <string.h> #include <ctype.h> #include < ...
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even- ...
Global site tag (gtag.js) - Google Analytics