#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main()
{
int flag=0,a,b,tot=0;
scanf("%d%d",&a,&b);
if(a>b)swap(a,b);
for(int i=a+1;i<b;++i)
{
flag=1;
for(int j=2;j<=sqrt(i);++j)
{
if(i%j==0)
{
flag=0;
break;
}
}
if(flag==1)
tot+=i;
}
printf("%d",tot);
return 0;
}

相关文章:

  • 2021-08-31
  • 2022-12-23
  • 2021-11-14
  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
猜你喜欢
  • 2021-12-11
  • 2022-12-23
  • 2021-08-27
  • 2022-12-23
  • 2021-11-10
  • 2021-05-02
相关资源
相似解决方案