Training Site
Sideways banner

Haskell, Ruby, and J

Input: Standard Input (stdin)
Output: Standard Output (stdout)
Memory limit: 100 megabytes
Time limit: 1.0 seconds

This site also takes programs written in Haskell 2010, Ruby 2.2, and J 8.03. These languages were added by enthusiasts in the past so we don't actively support them. If they work for you then you may still use them.

I/O and Documentation

  • Get input from standard input and print to standard output.
  • You may use the standard online documentation for your language during and NZIC contest.

Example

Write a program to add two numbers and print the result. Numbers will be space separated on a single line (see the sample input and output below).

Submit

  • Go to the submit tab and upload your code. Select your chosen language from the dropdown.
  • Do not use input prompts (e.g. Input a number:) because these will be evaluated as incorrect output. See the walk-through below to understand why.
  • Walk-through example and explanation. This example uses Python but applies to all languages when used on this site.
  • Understanding submission feedback.

Sample Explanation

3 + 4 = 7

  • Sample Input 1

    3 4
    

    Sample Output 1

    7