Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int n = 28;
- int k = 4;
- int broj_na_deliteli_na_n = 0;
- for(int i = 1; i <= n; i += 1) {
- if(n % i == 0) {
- broj_na_deliteli_na_n += 1;
- }
- }
- int ok = 1;
- for(int i = n - 1; i >= n - k; i -= 1) {
- int deliteli_na_i = 0;
- for(int j = 1; j <= i; j += 1) {
- if(i % j == 0) {
- deliteli_na_i += 1;
- }
- }
- if(broj_na_deliteli_na_n <= deliteli_na_i) {
- ok = 0;
- }
- }
- if(ok == 1) {
- cout << "DA" << endl;
- }
- else {
- cout << "NE" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement