Search found 1 match

by Maqsud
Thu May 28, 2015 10:20 pm
Forum: Volume 119 (11900-11999)
Topic: 11970 - Lucky Numbers
Replies: 7
Views: 3665

Re: 11970 - Lucky Numbers

I don't understand why i'm getting wrong answer for this problem ? #include <iostream> #include <stdio.h> #include <math.h> using namespace std; int main() { int t; scanf("%d",&t); for(int c=1;c<=t;c++){ int n; scanf("%d",&n); printf("Case %d:",c); for(int i=(int)sqrt(n);i>1;i--){ if(n%i==0){ int r=...

Go to advanced search