TCCC '24 June P2 - Big Numbers

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type

Barry likes big numbers. He really likes numbers greater than 1000, but doesn't like how they often come with commas separating the digits into groups of 3. Worse, sometimes they even have spaces to separate the digits instead! Can you help sanitize Barry's numbers?

Input Specification

The first and only line will contain a string S, representing a positive integer less than or equal to 10^{50}, with digits separated by either spaces or commas. Both may be used in the same number.

Output Specification

The same number without spaces and commas.

Sample Input 1

1,024

Sample Output 1

1024

Sample Input 2

1,234 567,890

Sample Output 2

1234567890

Comments

There are no comments at the moment.