Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
spoj BCPRIME
SUBMITTED BY:
Guest
DATE:
Feb. 16, 2014, 4:35 a.m.
FORMAT:
C++
SIZE:
604 Bytes
Raw
Download
Tweet
HITS:
851
Go to comments
Report
//Haha TTpro
//BCPRIME
//http://www.spoj.com/PTIT/problems/BCPRIME/
#include
<iostream>
using
namespace
std
;
bool
HahaTTproUltimate
(
int
kaboom
);
int
main
()
{
long
int
hahattpro
;
cin
>>
hahattpro
;
if
(
HahaTTproUltimate
(
hahattpro
))
cout
<<
"YES"
;
else
cout
<<
"NO"
;
}
bool
HahaTTproUltimate
(
int
kaboom
)
{
int
fuck
;
if
(
kaboom
==
1
)
return
false
;
for
(
fuck
=
2
;
fuck
<
kaboom
;
fuck
++
)
{
if
((
kaboom
%
fuck
)
==
0
)
return
false
;
}
return
true
;
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus