Log inSign up
Problems / P24

Counting characters (raw)

500 ptsrawqwen3-0.6bCases 16max 8 tokensSet by dongbinna
Added October 11.
0 solved2 attempted6 submissions

Statement

A single Korean word comes in. You have to print how many characters it has.

Word that comes inAnswer you have to give
안녕하세요5

For a person this is over as soon as you count, but the model does not look at the characters one at a time. It takes the word in as a whole and guesses the length by eye, so a number that is off by one, such as 4 or 6, comes out often. It is just as common for a prompt that works on a two character word to break on a five character one.

The task is the same as Counting characters (chat), and only the mode is raw.

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.
  • 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.
Read the requirements carefully before solving. Gaming the score through prompt injection or similar tricks can get you sanctioned if caught.

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.

Input
Expected output
안녕하세요
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.

Grading reads up to the blank line. That means you have to build the shape that pulls the characters apart and counts them inside a single line. This problem is on the hard side of this category.

Prompt

Qwen3 0.6B
Input to preview
This is the exact text that goes into the model (Sample input 1 is used here.)
안녕하세요
5 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.