8 条题解
-
3
陈梓豪 (陈梓豪1) LV 7 @ 10 个月前
#include<bits/stdc++.h>
using namespace std;
int main( )
{
int n,f;
cin>>n;
while(n>0)
{
f=1;
for(int j=2;j*j<=n;j++)
if(n%j==0)
{
f=0;
break;
}
if(f==0||n==1)break;
n/=10;
}
if(n>0)
cout<<"No"<<endl;
else
cout<<"Yes"<<endl;
return 0;
} -
310 个月前@
#include<iostream>
using namespace std;
int main( )
{
int n,f;
cin>>n;
while(n>0)
{
f=1;
for(int i=2;i*i<=n;i++)
if(n%i==0)
{
f=0;
break;
}
if(f==0||n==1)break;
n/=10;
}
if(n>0)cout<<"No"<<endl;
else cout<<"Yes"<<endl;
return 0;
} -
110 个月前@
#include<bits/stdc++.h>
using namespace std;
int main( )
{
int n,f;
cin>>n;
while(n>0)
{
f=1;
for(int j=2;j*j<=n;j++)
if(n%j==0)
{
f=0;
break;
}
if(f==0||n==1)break;
n/=10;
}
if(n>0)
cout<<"No"<<endl;
else
cout<<"Yes"<<endl;
return 0;
} -
12 年前@
-
010 个月前@
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
if(n%4==0&&n%100!=0||n%400==0)
cout<<"Y";
else
cout<<"N";
return 0;
} -
010 个月前@
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
int l=s.size(),cnt=0;
for(int i=0;i<s.size()/2+1;i++)
{
l--;
if(s[i]==s[l])
cnt++;
}
if(cnt==s.size()/2+1)
cout<<"Yes";
else
cout<<"No";
return 0;
} -
010 个月前@
#include<bits/stdc++.h>
using namespace std;
int main( )
{
int n,f;
cin>>n;
while(n>0)
{
f=1;
for(int j=2;j*j<=n;j++)
if(n%j==0)
{
f=0;
break;
}
if(f==0||n==1)break;
n/=10;
}
if(n>0)
cout<<"No"<<endl;
else
cout<<"Yes"<<endl;
return 0;
} -
03 年前@
- 1
信息
- ID
- 1636
- 难度
- 6
- 分类
- (无)
- 标签
- 递交数
- 378
- 已通过
- 91
- 通过率
- 24%
- 上传者