#K48442. Comma Separated Number

    ID: 28421 Type: Default 1000ms 256MiB

Comma Separated Number

Comma Separated Number

Given a non-negative integer (n), output its string representation with commas inserted as thousand separators. In other words, every three digits (starting from the right) should be separated by a comma. For example, if (n = 1000) the output should be "1,000", and if (n = 123456789) the output should be "123,456,789".

inputFormat

A single line from standard input containing a non-negative integer (n).

outputFormat

Print the string representation of the number (n) with commas as thousand separators to standard output.## sample

1000
1,000