Triplicant una matriu P24265


Statement
 

pdf   zip

thehtml

Write a program that reads a matrix m × n and prints it with its elements tripled.

Input

Input consists of two natural numbers strictly positive m and n, followed m lines with n integer numbers each one.

Output

Print the matrix with its elements tripled, following the format of the instance.

Public test cases
  • Input

    4 6
    5 7 6 4 1 2
    2 8 1 3 8 8
    0 1 2 9 2 1
    6 5 4 3 2 1
    

    Output

    15 21 18 12 3 6
    6 24 3 9 24 24
    0 3 6 27 6 3
    18 15 12 9 6 3
    
  • Information
    Author
    Salvador Roura
    Language
    English
    Translator
    Carlos Molina
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++
    User solutions
    C++