The Perse Coding Team Challenge


This video, kindly made by Chris Roffey from Bebras UK, nicely demonstrates how to use the code editor/grader on this site:

All inputs should be read from standard in and outputs printed to standard out.

Students are permitted to have available up to 20 sides of custom notes/snippets (paper or digital) in addition to the  standard documentation for their chosen language during the competition. One such example for python is this document, adapted with permission from Coding-Club Core Cards.

These examples all read a single integer and print double that number out.

num = int(input())
print(num * 2)
import java.util.*;

public class Solution {
public static void main(String[] args) {
    // Enter your code here
    Scanner scanner = new Scanner(;
int num = scanner.nextInt();
System.out.println(num * 2);

using System;
using System.Collections.Generic;
using System.IO;

class Solution {
static void Main(String[] args) {
// Enter your code here
int num = Int32.Parse(Console.ReadLine());
Console.WriteLine(num * 2);


Module Solution
Sub Main()
' Enter your code here
Dim num As Integer = Integer.Parse(Console.ReadLine())
Console.WriteLine(num * 2)
End Sub
End Module

JavaScript (Node.js)

var input_stdin = "";
var input_stdin_array = "";
var input_currentline = 0;

process.stdin.on('data', function (data) {
    input_stdin += data;

process.stdin.on('end', function () {
    input_stdin_array = input_stdin.split("\n");

function readLine() {
    return input_stdin_array[input_currentline++];

function main() {
// Enter your code here
    var num = parseInt(readLine());
    console.log(num * 2);

C++ 11:

#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;

int main() {
// Enter your code here
string sNum;
getline(cin, sNum);
int num = stoi(sNum);
cout << num * 2 << "\n";
return 0;

Note: one advantage of using getline for c++ input is that when multiple values are provided on one line of input (e.g. 2 3 5 7) then you can easily read through to the next delimeter e.g.

getline(cin, sNum, ' ');

However, of course, you could also in this case just do the shorter:

#include <iostream>
using namespace std;

int main() {
  // Enter your code here
  int num;
  cin >> num;
  cout << num * 2 << "\n";
  return 0;