10699 - Count the Factors

All about problems in Volume CVI. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

10699 WA why

Postby tolgaulusoy » Wed Jul 18, 2007 4:35 pm

Does anybody know tricky testcase?

my testcase :

    2
    3
    1000000
    700001
    6
    1
    10
    500000
    500001
    123456
    987651
    11
    999999
    1000001
    700001
    999999
    438444
    78498
    564231
    0

and output :
    2 : 1
    3 : 1
    1000000 : 2
    700001 : 1
    6 : 2
    1 : 0
    10 : 2
    500000 : 2
    500001 : 2
    123456 : 3
    987651 : 4
    11 : 1
    999999 : 5
    700001 : 1
    999999 : 5
    438444 : 4
    78498 : 4
    564231 : 3
Last edited by tolgaulusoy on Sun Jul 29, 2007 7:49 pm, edited 5 times in total.
tolgaulusoy
New poster
 
Posts: 1
Joined: Mon Jun 18, 2007 9:46 pm

Postby jainal cse du » Tue Jul 24, 2007 8:52 am

Code: Select all
please give me what is the different prime factors for following input:

289384
930887
692778
636916
747794
238336
885387
760493
516650
641422

User avatar
jainal cse du
New poster
 
Posts: 23
Joined: Thu Jul 27, 2006 2:43 pm
Location: University of Dhaka,Bangladesh

Postby abdullah<cse du> » Tue Jul 24, 2007 2:11 pm

Jainal,

My accepted code gives the following output.

289384 : 3
930887 : 2
692778 : 5
636916 : 4
747794 : 3
238336 : 3
885387 : 2
760493 : 2
516650 : 3
641422 : 3

Hope this will help you.
ABDULLAH.
We were in past, we are in past and we will go in past.
abdullah<cse du>
New poster
 
Posts: 39
Joined: Mon Dec 04, 2006 2:18 pm
Location: Bangladesh(CSE DU)

Thanks

Postby mohsincsedu » Fri Dec 21, 2007 2:14 am

I got ACC:)

Thanks to Martin Macko


The running time is 0.020 ...
how way i can improve my running time.....



thanks in advanced..
Amra korbo joy akhdin............................
mohsincsedu
Learning poster
 
Posts: 63
Joined: Tue Sep 20, 2005 12:31 am
Location: Dhaka

Re: 10699 - Count the Factors

Postby plamplam » Thu Jun 23, 2011 10:53 am

Consider these cases:
Code: Select all
2
4
18
95918
874211
942561
179550
529165
897750
840840
510510
0


Code: Select all
2 : 1
4 : 1
18 : 2
95918 : 3
874211 : 2
942561 : 2
179550 : 5
529165 : 4
897750 : 5
840840 : 6
510510 : 7
You tried your best and you failed miserably. The lesson is 'never try'. -Homer Simpson
User avatar
plamplam
Experienced poster
 
Posts: 151
Joined: Fri May 06, 2011 11:37 am

Re: 10699 - Count the Factors

Postby kier.guevara » Fri Jan 25, 2013 3:28 pm

Code: Select all
 got AC


Just forgot to include the number itself to check as a prime
kier.guevara
New poster
 
Posts: 29
Joined: Thu Jul 19, 2012 11:24 pm

Previous

Return to Volume CVI

Who is online

Users browsing this forum: No registered users and 0 guests