47 27 48 27 50 28 30 28 49 29 45 29 48 29 50 30 46 30 49 31 40 31 43
31 50 32 44 32 46 32 49 33 41 33 49 34 42 34 48 34 49 35 49 36 38 36
48 36 49 37 45 37 47 37 48 37 49 38 46 39 44 39 50 41 44 41 50 43 45
43 48 43 49 44 45 44 46 44 47 45 46 45 47 46 47 46 50
December 14 Question 2
Due on 2014-12-23, 05:30 IST
Given a number, print it in the Indian way of
writing the numbers with commas. In the
Indian system the rightmost comma is placed
after three rightmost digits, and then a comma
is placed after every two digits from the right.
If a number has less than or equal to 3 digits,
then do not put any commas.
For example:
1001921900000 -----> Indian System:
10,01,92,19,00,000
31000 -----> Indian System: 31,000
100 -----> Indian System: 100
12000000 -----> Indian System: 1,20,00,000
Input:
A number with at most 50 digits.
Output:
A single line with the Indian style of writing
the number with commas.
Sample Input 1
1021111
Sample Output 1
10,21,111
Sample Test Cases
Input Output
Test
Cas
e 1
21323141124124 2,13,23,14,11,24,124
Test
Cas
e 2
93184915910001 9,31,84,91,59,10,001
Test
Cas
e 3
3241738742310515910510951059105
10
32,41,73,87,42,31,05,15,91,05,10,95,10,59,10,
510
Test
Cas
e 4
2143413415151513515 21,43,41,34,15,15,15,13,515