Example Problem
How do I take the input of this type in Java where n is not given?
Check some JAVA solutions of this problem, it should help. https://www.codechef.com/DEC17/problems/CPLAY
Check some JAVA solutions of this problem, it should help. https://www.codechef.com/DEC17/problems/CPLAY