Hide

Problem A
MiNISTer

Languages en sv

The Prime Minister of Tredkåja has received approval ratings from the people of Tredkåja. Unfortunately, the way all numbers are collected is very outdated. Each citizen sends a paper slip that is $28 \times 28$ pixels in size, where they have written their trust in the Prime Minister, a digit between 0-9.
Since Tredkåja has not undergone significant technological development, the Prime Minister has previously had to count all of these by hand. But now he is asking you to identify the digit on each slip of paper instead.

Your goal is to write a program that reads all handwritten digits and determines which digit is present on each paper slip.
To assist you, he has also provided a list of YouTube videos and articles:

For this task we have not given you training data, this means that you are free to find whatever training data you may want on the internet.

Input

Download the test data file. This is found at the bottom under "attachments." It contains 10,000 images, where each image is described by one $28 \times 28$ integer matrix where each value is the grayscale value of that pixel between 0 and 255. You can read more about the grayscale color system here: https://en.wikipedia.org/wiki/Grayscale.

Output

For each image, print a digit between 0 and 9: the digit present in the image. Print all digits on a single line without spaces.

Scoring

During the competition, your solution will be tested on a randomly selected 30% subset of the digits you have printed. Note that the same 30% will always be tested during the competition. You will then receive a score based on the percentage of correct answers, on a scale between 10% accuracy and the best hypothetical solution at 100% accuracy. Suppose your solution has "Your" accuracy. Then, your score is calculated as follows:

\[ 100 \cdot \frac{Your - 10}{100 - 10} \]

In particular, you get 100 points if your solution is the best or ties with the best.

At the end of the competition, all solutions will be retested on the remaining 70% of the digits. Your final score will be based only on this remaining 70%. The 30% tested during the competition has no impact on your final score. The 30% used during the competition is uniformly randomly chosen and completely disjoint from the final 70%. Therefore, the results from the 30% during the competition should be seen as a strong indicator of how good your solution is. However, it is not advisable to overfit your solution to the test data.

Please log in to submit a solution to this problem

Log in