blob: df07a88a40325ff66a70e7a14dff10bd1713ee68 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
uses clib;
var
n: int64;
b: boolean;
begin
readln(n);
b := isprime(n);
while b and (n > 9) do
begin
n := n div 10;
b := b and isprime(n)
end;
writeln(b)
end.
|