TIGA  Nuts Frenzy
Ivan, Filbert, and Tracy really like nuts. They can eat nuts without stopping all day long if they want to. Today they decided to buy some nuts so each one of them get exactly K nuts (1<=K<=1,000,000,000) and they want to eat it all. To make it interesting, they are only allowed to eat a certain number of nuts every second.
 Ivan can eat at max I nuts per second. (1<=I<=1,000,000)
 Filbert can eat at max K/F nuts per second. (1<=F<=100)
 Tracy can eat at max the sum of all the factors of K excluding 1 and K nuts per second.
They are not allowed to eat only a fraction of a nut every second, and they must eat a minimum of 1 nut every second regardless of the previous rule. They can stop eating after they run out of nuts. Your task is to determine the time needed (in seconds) for each of them to finish their nuts!
Input
The first line of input is T, the number of test case. (T<20)
The next T lines each consists of three numbers K, I, and F separated by a space.
Output
For each test case, output the minimum time needed for Ivan, Filbert, and Tracy to finish their nuts.
Example
Input:3
Output:
10 2 5
100 10 4
121 100 15 5 2
10 4 1
2 1 11
hide comments
(Tjandra Satria Gunawan)(æ›¾æ¯…æ˜†):
20130119 14:48:07
@Zukow: If you move this problem to tutorial, DIVSUM problem should be moved to tutorial too, don't you think? 

:D:
20121028 13:33:16
Again, borderline brute force gets an easy AC. Moving to tutorial. 

david_8k:
20121026 03:33:28
Is it the answer for the case "10 3 3" "4 4 2" because:


Hashfi Alfian Ciyuda:
20121023 15:02:13
what is the output if input 5 0 0??


Ehor Nechiporenko:
20121023 15:02:13
@Tjandra thanks for the help a lot!!!! 

(Tjandra Satria Gunawan)(æ›¾æ¯…æ˜†):
20121023 15:02:13
@Ehor Nechiporenko: Yes, actually you miss something. Read the problem statement carefully, it's clearly described that "They are not allowed to eat only a fraction of a nut every second, and they must eat a minimum of 1 nut every second regardless of the previous rule." 

Ehor Nechiporenko:
20121023 15:02:13
Sorry but what the answer should be if k is prime, as example 5? In this case Tracy can eat at maximum 0 coconats per second, so he will never finish eating nuts!


Vikas Kushwaha:
20121023 15:02:13
is there any special test case..


(Tjandra Satria Gunawan)(æ›¾æ¯…æ˜†):
20121023 15:02:13
@Ehor Nechiporenko: Yes, sometimes k is prime number. and Yes, there's a test with f>k. 

Ehor Nechiporenko:
20121023 15:02:13
Could k be prime?? And is there a test, when f > k? Last edit: 20121022 08:38:12 
Added by:  Andy 
Date:  20121020 
Time limit:  0.395s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  own problem 