Prime factorisation in java
For a coding contest, the answer is almost never to implement the problem the same way as it is given.
For example here, functions A and B are actually intentionally misleading. Function A is also known as Euler's Totient, and function B computes the sum of totients of divisors which is the same as the original number. Detailed review of them is therefore a waste, functions A and B don't need to be implemented at all.
Function C can be improved by noting that the lowest divisor of a number is necessarily a prime, so calling check_prime is unnecessary. If itr was a * b then a and b would have been found first and divided out of remNum already, making itr not a divisor of remNum.
The square root is also unnecessary, and relatively expensive. It can be avoided by testing itr * itr &lt;= numb instead. There is no risk of overflow given that numb &lt;= 1000000. Further refinements are possible.
Function D can be improved by caching the partial sums. In isolation that would not help, but there can be multiple test cases during a run of the program, and they can reuse the previously computed sums. For example as an extreme case, after the test case 1000000 has been used, any further test cases could be essentially free, because all possible cases would have been calculated at that point. Also, after funcD(10) has been evaluated, funcD(20) could start with that result instead of starting over from scratch.