[USACO 2007 Jan L]Multiplication Table
题号:NC25047
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 32 M,其他语言64 M
64bit IO Format: %lld

题目描述

Poor Bessie simply can't remember her multiplication tables. Please help her by creating a 'times' table in exactly this format. For this table, N=11:
  • First column is generally two digits wide
  • Subsequent columns are four digits wide

  • Headers on first row and first column

  • The '*' reminds Bessie this is a multiplication table

Write a program to reproduce tables like this where 4 <= N <= 40.

输入描述:

Line 1 : A single integer, N

输出描述:

Lines 1..N+1: A table as described above.
示例1

输入

复制
4

输出

复制
 *   1   2   3   4
 1   1   2   3   4
 2   2   4   6   8
 3   3   6   9  12
 4   4   8  12  16