Big number subtraction (chat)
Statement
Two six-digit numbers are subtracted. In chat mode there is no limit on the number of lines, so there is plenty of room to use as a scratchpad, which in turn lets you make the model write the working out at length.
| Input | Expected output |
|---|---|
| 913204 - 487561 | 425643 |
A 0.6B does not get a six-digit subtraction right in one go. It slips by one digit most often where borrowing runs on from column to column. Making it write the work out column by column raises how often it lands on the right answer.
Input
A string of the form
X - Yarrives as the input.The input arrives as one line.
X is a natural number between 466820 and 977561.
Y is a natural number between 123457 and 764918.
There is one space between each number and the operator.
Output
Print the result of the subtraction on the first line as an integer.
The output value is a natural number between 85085 and 586953.
Do not add any other characters.
Not a single character may differ from the expected value.
Requirements
- The input has the form
A - B, six-digits each. - The output is the difference as an integer.
- 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.
- 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 16 tokens.
- You have to pass all 16 cases to solve this.
Examples
5 public cases. Judging also uses hidden cases. You have to pass all 16 cases to solve this.
913204 - 487561
425643
700000 - 123457
576543
845930 - 269481
576449
512037 - 398152
113885
960418 - 574839
385579
Notes
Background that helps with solving. The rules you have to follow are in the input and output specs and the requirements above.
On the other hand, since lastInt looks at the last integer, any further text with a number in it that follows the working out is read as the answer. Make the model write at length, but make it end on a number.