Problems
Odd divisors
В условии ничего не сказано про порядок вывода делителей.
import math n = int(input()) ans = 0 for i in range(1,int(math.ceil(math.sqrt(n)))): if n%i == 0: if i%2 == 1 or n/i%2 == 1: print(i)
include<iostream>
include<cmath>
using namespace std; int main() { long long a,bolen=0; cin>>a; while(1) { bolen++; if(a%bolen==0 && bolen%2!=0) cout<<bolen<<' '<<endl; if(a<bolen){ break; } } return 0; }
n=int(input()) p=1 while p<=n: if n%p==0 and p%2!=0: print(p) p+=1