https://www.hackerearth.com/practice/basic-programming/implementation/basics-of-implementation/practice-problems/algorithm/title-abhi-socha-nahi/submissions/?utm_source=header&utm_medium=search&utm_campaign=he-search
#include <stdio.h>
#include <math.h>
int main()
{
unsigned long long int num,a,b;
scanf("%llu", &num);
for(a = sqrt(num);num%a != 0; a--);
b=num/a;
printf("%llu", a+b);
}
No comments:
Post a Comment