Log inSign up
Problems / S11

Thousands separators (raw) · SmolLM2 135M

200 ptsrawsmollm2-135mCases 16max 16 tokensSet by dongbinna
Added October 11.
0 solved1 attempted1 submissions

Statement

One integer arrives. You have to print it with a comma after every three digits from the right.

InputExpected output
12345671,234,567

Adding a unit or an explanation makes it wrong. Because it comes down to counting places, a comma often lands one digit off or goes missing altogether. And when the input value has fewer than four digits, such as 45, no comma goes in at all.

Input

  • A single integer comes in as input.

  • The input arrives as one line.

  • The input value is a natural number from 45 to 9000000.

Output

  • Print the integer with a comma every three digits on the first line.

  • The output is between 2 and 9 characters long.

  • Do not add any other characters.

  • Not a single character may differ from the expected value.

Requirements

  • The input is an integer with no commas.
  • The output is the integer with a comma every three digits.
  • This is raw mode. Your two pieces and the input are joined together as they are and fed to the model. No chat template and no <think> is added. Grading looks only as far as the first line.
  • The output must match the expected value down to the last character. Only leading and trailing whitespace is ignored.
  • This problem is solved with SmolLM2 135M. It is a far smaller model than Qwen3 0.6B, so the same prompt does not simply carry over.
  • There are 16 cases, and 5 of them show the input together with the expected output. The rest show the input only.
  • Model output is accepted up to 16 tokens.
  • You have to pass all 16 cases to solve this.
Read the requirements carefully before solving. Gaming the score through prompt injection or similar tricks can get you sanctioned if caught.

Examples

5 public cases. Judging also uses hidden cases. You have to pass all 16 cases to solve this.

Input
Expected output
1234567
1,234,567
4500
4,500
980
980
120000
120,000
7654321
7,654,321

Notes

Background that helps with solving. The rules you have to follow are in the input and output specs and the requirements above.

SmolLM2 135M is a fraction of the size of Qwen3 0.6B. It lets instructions slide far more often. You have to say the same thing more briefly and more clearly for it to listen.

Prompt

SmolLM2 135M
Input to preview
This is the exact text that goes into the model (Sample input 1 is used here.)
1234567
7 chars · edit the boxes above and this text changes with them · raw mode, so the three pieces are joined as they are
0 chars
To solve problems you need to log in.