田心枫
package com.imooc.eleven;
/**
* Created by junfeng on 17/4/11.
*/
public class WeekDemo1 {
public static void main(String[] args) {
// System.out.println(1453%10);
int sum =0;
int n=0;
for (int i=3;i<=1000;i++){
if (i%10==3&&isPrime(i)){
sum += i;
n++;
}
}
System.out.println(sum);
System.out.println(n);
}
public static boolean isPrime(int n){
for(int i=2;i<=n/2;i++){
if(n%i == 0)
return false;
}
return true;
}
}