Problem A. Small Addition

Author:A. Klenin
Input file: input.txt   Time limit:5 sec
Output file: output.txt   Memory limit:200 Mb

Statement

You are to write a problem that reads two positive integers A and B with no more then five decimal digits and outputs their sum A+B.

Input file format

First line of input file contains two integers A and B.

Output file format

Output file must contain a single integer C = A+B.

Constraints

-10000 <= A, B <= 10000

Sample tests

No. Input file (input.txt) Output file (output.txt)
1
3 5
8

Problem B. Matrix detour: Spiral

Author:A. Klenin
Input file: input.txt   Time limit:2 sec
Output file: output.txt   Memory limit:200 Mb

Statement

Your program must fill the N by N square matrix with integers from 1 to N2; in the following way:

Input file format

Input file contains an integer N.

Output file format

Output file must contain the filled matrix as N lines consisting of N integers each.

Constraints

1 <= N <= 100

Sample tests

No. Input file (input.txt) Output file (output.txt)
1
2
1 2
4 3
2
3
1 2 3
8 9 4
7 6 5

0.027s 0.005s 9