Log inSign up
Problems / P50

Write code and get it judged (raw)

500 ptsrawqwen3-0.6bCases 16max 200 tokensSet by dongbinna
Added October 11.

Statement

The same task as P49, but in raw mode. With no chat template, the model is not an assistant but a machine that carries on writing text.

A one line description of the function you have to write comes in. The model prints JavaScript code that does the job, and the same model becomes the judge and marks that code out of 5. Only full marks pass the case.

InputJudge score needed to pass
배열에서 가장 작은 수를 돌려주는 함수5

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 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 same Qwen3-0.6B becomes the judge and marks the code the model produced out of 5.
  • The prompt the judge uses is fixed and published in full below. You cannot change it.
  • If the judge fails to produce a 점수: N line, 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.
  • 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 200 tokens.
  • 16 cases × 5 points = 80 points in total. 56 points or more solves it.
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. 16 cases × 5 points = 80 points in total. 56 points or more solves it.

Input
Expected output
배열에서 가장 작은 수를 돌려주는 함수
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.

This side is harder. You cannot give instructions, so few-shot examples are the only way to get across that the code starts here. The model also does not know when to stop, so after the code it starts inventing another task and writing on. If that tail is long, the judge does not know what it is supposed to be judging.

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

점수: 

Prompt

Qwen3 0.6B
Input to preview
This is the exact text that goes into the model (Sample input 1 is used here.)
배열에서 가장 작은 수를 돌려주는 함수
21 chars · edit the boxes above and this text changes with them · raw mode, so the three pieces are joined as they are
What you write here is only used to make the model write code. The judge gets a fixed prompt, so there is no talking the judge into anything.
0 chars
To solve problems you need to log in.