5180692644

5180692644



An important topie nowadays in Computer science is cryptography. Some people even think that cryptography is the only important field in Computer science, and that life would not matter at all without cryptography.

Alvaro is one of such persons, and is designing a set of cryptographic procedures for cooking paella. Some of the cryptographic algorithms he is implementing make use of big prime numbers. However, checking if a big number is prime is not so easy. An exhaustive approach can reąuire the division of the number by all the prime numbers smaller or equal than its sąuare root. For big numbers, the amount of time and storage needed for such operations would certainly ruin the paella.

However, some probabilistic tests exist that offer high confidence at Iow cost. One of them is the Fermat test.

Let a be a random number between 2 and n — 1 (being n the number whose primality we are testing). Then, n is probably prime if the following eąuation holds:

an mod n = a

If a number passes the Fermat test several times then it is prime with a high probability.

Unfortunately, there are bad news. Some numbers that are not prime still pass the Fermat test with every number smaller than themselves. These numbers are called Carmichael numbers.

In this problem you are asked to write a program to test if a given number is a Carmichael number. Hopefully, the teams that fulfill the task will one day be able to taste a delicious portion of enerypted paella. As a side notę, we need to mention that, according to Alvaro, the main advantage of enerypted paella over conventional paella is that nobody but you knows what you are eating.

Input

The input will consist of a series of lines, each containing a smali positive number n (2 < n < 65000). A number n — 0 will mark the end of the input, and must not be processed.

Output

For each number in the input, you have to print if it is a Carmichael number or not, as shown in the sample output.

Sample Input

1729

17

561

1109

431

0

Sample Output

The number 1729 is a Carmichael number.

17 is normal.

The number 561 is a Carmichael number.

1109 is normal.

431 is normal.



Wyszukiwarka

Podobne podstrony:
114 Krzysztof Waliszewski The origination of a new subdiscipline in financial science is connected w
MASTER OF SCIENCE IN COMPUTER SCIENCE Degree Reąuirements Core Courses
HOWYour Brain Logos play an important emotional role in influencing decision making. especially when
7THE FIRST FLOOR Is approached by an exceptionally fine MASSIVE OAK STAIRCASE which is the feature i
G. Kiss The Concept to Measure and Compare Students Knowledge Level in Computer Science _in Germany
G. Kiss The Concept to Measure and Compare Students Knowledge Level in Computer Science _in Germany
G. Kiss The Concept to Measure and Compare Students Knowledge Level in Computer Science _in Germany
G. Kiss The Concept to Measure and Compare Students Knowledge Level in Computer Science _in Germany
G. Kiss The Concept to Measure and Compare Students Knowledge Level in Computer Science _in Germany
G. Kiss The Concept to Measure and Compare Students Knowledge Level in Computer Science _in Germany
G. Kiss The Concept to Measure and Compare Students Knowledge Level in Computer Science _in Germany
BSc in Computer ScienceWrocław University of Technologyaddress: Wybrzeże Wyspiańskiego 27, 50-370 Wr
NEWOnline Master s in Computer Science Advance Your Career on Your Time LEARN MORĘ
Graphics: Proc. Int. Conf. ICCVG 2010, volume 6374 of Lecture Notes in Computer Science: 264-273, Wa
Moreover, one of the hijras’ favorite in-group insults is the term bhosri vald Vagina-owner’, an epi
65 UNIT 7. TIME FOR SCHOOL Lesson 4. An English test. 122 ▼ Read and circle. The Computer gamę is th
Rozdział 1Wstęp Computer Science is no morę about computers than astronomy is
00344 ?901c63c87335b6f7bf31c8dbbac4a5 348 Prairie & Zimmer ąuality. The purpose of the plans pr
1. Mathematics in Chemistry 1.1. Mathematics in chemistry Chemistry is the study of matter and the c

więcej podobnych podstron