Python
Input: Standard Input (stdin)
Output: Standard Output (stdout)
Memory limit: 100 megabytes
Time limit: 1.0 seconds
Output: Standard Output (stdout)
Memory limit: 100 megabytes
Time limit: 1.0 seconds
- Use the
input()
function to get input. - Use the
print()
function to write output. - You are permitted to view the Official Python Documentation during an NZIC contest.
Example
Adding two numbers. Numbers will be space separated on a single line.
nums = input().split()
total = int(nums[0]) + int(nums[1])
print(total)
Submit
- Go to the submit tab and upload the addition program above by copy-pasting and selecting Python in the language dropdown.
-
Do not use input prompts e.g.
input("Numbers: ")
. See the walk-through to understand why. - Walk-through example and explanation.
- Understanding submission feedback.
-
Sample Input 1
3 4
Sample Output 1
7