Description A mathmatician Goldbach's conjecture: any even number(larger than 2) can divide into two prime number’s sum.But some even numbers can divide into many pairs of two prime numbers’ sum. Example:10 =3+7, 10=5+5, 10 can divide into two pairs of two prime number. Input Input consist a positive even number n(4<=n<=32766).

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Description

A mathmatician Goldbach's conjecture: any even number(larger than 2) can divide into two prime number’s sum.But some even numbers can divide into many pairs of two prime numbers’ sum.

Example:10 =3+7, 10=5+5, 10 can divide into two pairs of two prime number.

Input

Input consist a positive even number n(4<=n<=32766).

 

Output

Print the value of how many pairs are this even number can be divided into.

 

Sample Input 1 

1234

Sample Output 1

25
Description
哥德巴赫猜想(Goldbach's conjecture)是數論中存在最久的未解問題之一。這個猜想最早出現在1742年普魯士人克里斯蒂安-哥德巴赫與瑞士數學家萊昂哈德-歐拉的通信中。用現代的數學語言,哥德巴赫猜
想可以陳述為:“任一大於2的偶數,都可表示成兩個質數之和。
像是10可以分解成(3 + 7) (5 + 5) 兩對質數的合。
A mathmatician Goldbach's conjecture: any even number(larger than 2) can divide into two prime number's sum.But some even numbers can divide into many pairs of two prime numbers' sum.
Example:10 =3+7, 10=5+5, 10 can divide into two pairs of two prime number.
Input
輸入只有一個正整數n(4<=n<=32766).
Input consist a positive even number n(4<=n<=32766).
Output
請輸出該輸入的整數可以被分解成多少對質數的合。
Print the value of how many pairs are this even number can be divided into.
Sample Input 1 É
Sample Output 1
1234
25
Transcribed Image Text:Description 哥德巴赫猜想(Goldbach's conjecture)是數論中存在最久的未解問題之一。這個猜想最早出現在1742年普魯士人克里斯蒂安-哥德巴赫與瑞士數學家萊昂哈德-歐拉的通信中。用現代的數學語言,哥德巴赫猜 想可以陳述為:“任一大於2的偶數,都可表示成兩個質數之和。 像是10可以分解成(3 + 7) (5 + 5) 兩對質數的合。 A mathmatician Goldbach's conjecture: any even number(larger than 2) can divide into two prime number's sum.But some even numbers can divide into many pairs of two prime numbers' sum. Example:10 =3+7, 10=5+5, 10 can divide into two pairs of two prime number. Input 輸入只有一個正整數n(4<=n<=32766). Input consist a positive even number n(4<=n<=32766). Output 請輸出該輸入的整數可以被分解成多少對質數的合。 Print the value of how many pairs are this even number can be divided into. Sample Input 1 É Sample Output 1 1234 25
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Arrays
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education