# DCP-5: Solve the Recursion Back to All Problems

Today one of the developers of Dev Skill team found a bug. His code has been crashing after some test run. He analyzed the issue for a while. After sometime he found the problem. This issue has occurred for a simple recursion method which is given below: ![recursion][1] The problem with the recursion is when large values are given as input in that recursion function the program crashes. The developer with his experience understands that this recursion can be simplified to avoid this issue. But the developer has another assigned task. He needs someone else to simplify the recursion. He made some sample input-output for that person that caused the current recursion to fail so that after he simplifies the recursion he/she can use the test data to check whether it is working now or not. Input: ------ Each test case contains three integers n1, n2 and n3 **(1 ≤ n1, n2, n3 ≤ 10^9)** in a single line separated by a space. Output: ------- Print the result of the **recur** function for each test case in a line. Sample Input ------------ 6335 18468 42 15725 19170 26501 26963 29359 11479 Sample Output ------------- 12712 54065 65405 [1]: https://s3-ap-southeast-1.amazonaws.com/devskillimagestorage/questionimages/ea5fa96e-6883-cc93-60d8-08d2e151f404_1f45b3ab7bbd44fdbe526744c6574f33_W443xH255.png

### Problem Limits

 Language Time Limit (seconds) C/C++ 1.00 Java 2.00 C# 2.00 PHP 2.00

# 107/307

Solve/Submission

### Ranking

# User Language Timing
01 Monir_AUST Cpp 0.00s
02 Salty_Coder Cpp 0.00s
03 Knight_King Cpp 0.00s
04 seyedssz Cpp 0.00s
05 AlaminJust Cpp 0.00s
06 mahrahat Cpp 0.00s
07 Mahbub_Rahman Cpp 0.00s
08 Khayrul_34 Cpp 0.00s
09 ash12 Cpp 0.00s
11 mir_lutfur_rahman Cpp 0.00s
12 Logic_Hunter Cpp 0.00s
14 deder Cpp 0.00s
15 shabbirdu2012 Cpp 0.00s
16 Hasan_Masud Cpp 0.00s
17 rajdipsaha Cpp 0.00s
18 asiuzzaman006 Cpp 0.00s
19 SakibAlamin Cpp 0.00s
20 nafiamahjabin Cpp 0.00s
21 mjtbasif Cpp 0.00s
22 bug_hunter Cpp 0.01s
24 subhashis_cse Cpp 0.01s
25 acroaticus Cpp 0.01s
26 onucsecu Cpp 0.01s
27 nazmul_bzs Cpp 0.01s
28 golapraj Cpp 0.01s
29 ishrafislam2727 Cpp 0.01s
30 emrul Cpp 0.01s
31 Ansarul_14 Cpp 0.01s
32 anik_JU Cpp 0.01s
33 noshin_ju Cpp 0.01s
34 Protap_Ghose Cpp 0.01s
35 Anubis Cpp 0.07s
36 ddevilred1 Cpp 0.07s
37 tuhin_47 Cpp 0.07s
38 SkSaber Cpp 0.07s
39 Faridur Cpp 0.07s
40 Dinar Cpp 0.08s
42 Partha11 Cpp 0.08s
43 anis Cpp 0.18s
44 Machine Cpp 0.21s
45 Atik_Ahamed Cpp 0.23s
46 ih_hira Cpp 0.26s
47 Mir00r Cpp 0.28s
48 asif3058 Cpp 0.28s
49 rayhan50001 Cpp 0.32s
50 dmehrab06 Cpp 0.33s
Feedback