eolymp
bolt
Try our new interface for solving problems
Problems

Odd divisors

published at 8/10/15, 10:01:21 am

В условии ничего не сказано про порядок вывода делителей.

published at 1/16/24, 1:42:51 pm

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)

published at 1/21/24, 9:02:48 am

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; }

published at 2/8/24, 7:53:00 pm

n=int(input()) p=1 while p<=n: if n%p==0 and p%2!=0: print(p) p+=1