369 Numbers : 15 days of Competitive Coding

Problem Link:- https://hack.codingblocks.com/app/practice/8/838/problem
Solution: - https://ide.codingblocks.com/s/377855
Sir while compiling my code I am getting this:-
runguard: warning: timelimit exceeded (wall time): aborting command
runguard: warning: command terminated with signal 15

Can you please tell me what is wrong with my code?