Welcome![Sign In][Sign Up]
Location:
Downloads SourceCode Windows Develop Other
Title: uva543 Download
 Description: Title: In 1742, a German amateur mathematician Christian Goldbach, he made the following guess: Any even larger than 4 will be able to find two odd primes it and equal. For example: 8 = 3+5 (3 and 5 are odd, and is a prime number) 20 = 3+17 = 7+13 42 = 5+37 = 11+31 = 13+29 = 19+23 Your task is to write a program to verify his guess. Input pen input contains several test data, each data row that contains an even integer n (4 < n < 1000000). n = 0 represents the input end. Output for each input data you should to n = a+ b output in the form in which a, b are odd primes. If there is more than one set of a, b, ba please output the set maximum. If you can not find such a, b, please output " Goldbach' s conjecture is wrong." Solution: 1. To set up a one array, the odd prime number grid is set to 1, and the rest is set to 0, using the sieve method to obtain Erichsen 2. judge a prime number in an array, the array is 1 if the sum of the two equal input and output array position,
 Downloaders recently: [More information of uploader 蔡侑侖]
 To Search:
File list (Check if you may need any files):
 

uva543\uva543#a.in.txt
......\uva543#a.out.txt
......\uva543#b.in.txt
......\uva543#b.out.txt
......\uva543_1101105324.cpp
......\uva543_1101105324.exe
......\uva543_readme.txt
uva543
    

CodeBus www.codebus.net