-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuva-10006-Optimal.cpp
More file actions
45 lines (37 loc) · 919 Bytes
/
uva-10006-Optimal.cpp
File metadata and controls
45 lines (37 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <bits/stdc++.h>
using namespace std;
int main()
{
freopen("in.txt", "r", stdin);
freopen("out.txt", "w", stdout);
int n;
while (scanf("%d", &n)) {
if (!n) {
break;
}
/// Only 15 Carmichael numbers between 2 and 65000
switch (n) {
case 561:
case 1105:
case 1729:
case 2465:
case 2821:
case 6601:
case 8911:
case 10585:
case 15841:
case 29341:
case 41041:
case 46657:
case 52633:
case 62745:
case 63973:
printf("The number %d is a Carmichael number.\n", n);
break;
default:
printf("%d is normal.\n", n);
break;
}
}
return 0;
}