UVA-686 - Goldbach’s Conjecture (II)

  • UVa Online Judge 解題結果請於 Submit 後,參閱 uHunt
  • 如果你有任何建議與指教,歡迎於下方留言一起討論喔!
  • 相同題目:ZOJ-d307

題意概要

對任意一個大於或等於 的偶數 ,存在最少一對質數 使得 。題目給定一連串的偶數,而對應於每一個偶數,請找出共有幾對是符合上述要求的質數對。注意, 視為相同的質數對。


Input

An integer is given in each input line. You may assume that each integer is even, and is greater than or equal to and less than . The end of the input is indicated by a number 0.


Output

Each output line should contain an integer number. No other characters should appear in the output.


Sample Input

6
10
12
0

Sample Output

1
2
1
profile-image
David Lu
Hello, I'm David Lu. I am a graduate student in Department of Computer Science at National Chiao Tung University, Taiwan. I am in the Networking and Sensing Systems (NSS) Lab at NCTU. If you have any question, please feel free to contact with me.
comments powered by Disqus