Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main() {
- int N;
- scanf("%d", &N);
- int zbir = 0;
- for(int i = 1; i <= N; i++) {
- if(N % i == 0) {
- // i e delitel na N
- zbir += i;
- }
- }
- int proizvod = 1;
- while(N > 0) {
- int posledna_cifra = N % 10;
- proizvod *= posledna_cifra;
- N /= 10;
- }
- if((zbir % 2) == (proizvod % 2)) {
- printf("DA\n");
- }
- else {
- printf("NE\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement