Write code and get it judged (chat) · SmolLM2 135M
Statement
An algorithm task arrives as the input. You have to make the model write a JavaScript function that does that job.
There is no one fixed correct answer. Instead the same SmolLM2 135M becomes the judge, reads the code and gives it a score out of 5. The sum of those scores is your score on this problem.
You have to pull off two things at once here. First, making the model produce code and not an explanation. Second, making that code short and clear enough for a SmolLM2 135M judge to read. If the code is long and messy, the judge cannot even write the score line. Then it is 0 points.
Input
The input arrives as one line.
The input is between 15 and 26 characters long.
Output
Print the JavaScript code that does that job on the first line.
The output value is always 5.
Do not add any other characters.
Not a single character may differ from the expected value.
Requirements
- The input is a one line description of the function you have to write.
- The output is JavaScript code that does the job.
- This is chat mode. The prompt is wrapped in a chat template, so the model becomes an assistant. You can write control tokens yourself to build a conversation of several turns.
- The code the model produced is scored out of 5 by the same SmolLM2 135M acting as the judge.
- The prompt the judge uses is fixed and published in full below. You cannot change it.
- If the judge fails to produce a
점수: Nline, parsing fails and that case scores 0. This happens often when the code is long or messy. That is part of the skill too. - The code is not executed. The judge only reads it and decides.
- 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.
- 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.
- The output has to match the expected value down to the character. Only leading and trailing whitespace is ignored.
- On this problem, passing counts as solved only after someone else's machine produces the same output. The expected output here is always a full score, so the value is public, which means a prompt can pass without running the model at all. The server cannot tell those apart, so reproduction does it instead. Until that is confirmed, only partial credit is counted.
- 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 220 tokens.
- 16 cases × 5 points = 80 points in total. 56 points or more solves it.
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. 16 cases × 5 points = 80 points in total. 56 points or more solves it.
배열에서 가장 큰 수를 돌려주는 함수
5
문자열을 거꾸로 뒤집어 돌려주는 함수
5
두 수의 최대공약수를 돌려주는 함수
5
배열의 모든 수를 더해 돌려주는 함수
5
문자열에서 공백을 전부 지워 돌려주는 함수
5
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.
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.
Judge prompt
Fixed, and not editable. The code the model produced goes in the {코드} slot and the task goes in the {과제} slot. The same model runs once more with this prompt to produce a score.
너는 코드 심사위원이다. 아래 과제와 코드를 읽고 점수를 매겨라.
과제: {과제}
코드:
{코드}
채점 기준 (각 1점, 합계 0점에서 5점):
1. 과제가 요구한 일을 한다
2. 문법이 올바른 자바스크립트다
3. 함수로 되어 있고 값을 돌려준다
4. 군더더기 설명이나 군더더기 코드가 없다
5. 흔한 예외 입력에서 깨지지 않는다
반드시 마지막 줄에 아래 형식으로만 적어라. 다른 말은 붙이지 마라.
점수: N
점수: