Counting characters (raw) · SmolLM2 360M
Statement
This is effectively the same problem as Counting characters (chat). This one is a raw mode problem.
| Input line | Expected output |
|---|---|
안녕하세요 | 5 |
Grading reads up to the blank line. That means you have to build a form that lays the characters out separately and counts them inside one line. This problem is on the hard side of this category.
The model does not see characters, it sees tokens. 안녕하세요 goes in not as five characters but as a few chunks, so it often writes a number down without counting at all. Making it lay them out as 안 녕 하 세 요 is what starts getting the number right, but then the counting spreads over several lines and the first line gets dirty. Laying the characters out and finishing the job both have to happen inside one line.
Input
The input arrives as one line.
The input is between 1 and 5 characters long.
Output
On the first line, print one of
1,2,3,4,5.Do not add any other characters.
Not a single character may differ from the expected value.
Requirements
- The input is a single Korean word.
- The output is the character count written as an integer.
- 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. - Only the last integer of the output is read. You may write the working before it.
- This problem is solved with SmolLM2 360M. It is a far smaller model than Qwen3 0.6B, so the same prompt does not simply carry over.
- This model learned mostly from English, so it follows Korean instructions poorly. You may write your prompt in English. Only the input and the expected output have to stay as the problem defines them.
- 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 8 tokens.
- You have to pass all 16 cases to solve this.
Examples
The input data for this problem is in Korean. The expected output is not, so you can write your prompt in English. The example cases below show what the input looks like.
5 public cases. Judging also uses hidden cases. You have to pass all 16 cases to solve this.
안녕하세요
5
컴퓨터
3
대한민국
4
프로그래밍
5
책
1
Notes
Background that helps with solving. The rules you have to follow are in the input and output specs and the requirements above.
SmolLM2 360M 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.
Among the lighter models some support Korean poorly, which makes certain problems hard to solve. You may use English in your prompt, so solve it as well as you can.
Prompt
SmolLM2 360M안녕하세요
People who solved this problem
Ties on score are broken by shorter prompt, then by who submitted first. Getting the same result with a shorter prompt is harder.
Prompt text is shown after you solve this problem, and only for the ones their authors made public. For now you see the score, the length, and the environment each person used.
| # | Handle | Score | Prompt | Environment | Solved |
|---|---|---|---|---|---|
| 1 | gounk77 | 16/16 | 1580 chars | WebGPU · q4 | 24/10/2026 |