eolymp
bolt
Try our new interface for solving problems
Məsələlər

Sadə ədədlər

dərc olunub 14.11.21 17:16:48

lol

dərc olunub 26.01.24 17:29:32

include <bits/stdc++.h>

using namespace std; bool sade(long long n){

if(n<2){
    return false;
}

for(int i=2; i*i<=n;i++){

if(n%i==0){
        return false;
    }

} return true ;

}

int main() { long long n,m; int say=0; cin>>n>>m; for(int i=n; i<=m;i++){ if(sade(i)){ cout<<i<<endl; say++; }

} if(say==0){ cout<<"Absent"; } }