2015年7月27日 星期一

ITSA 桂冠賽 [Problem B1-易] Square and Cube

題目來源 :http://140.116.249.152/e-Tutor/mod/programming/view.php?id=23646


[Problem B1-易] Square and Cube

成績: 0 / 倒扣: 0.8
Time Limit: 1 second
Problem Description
● English
Ali is a primary school student and is learning multiplication of integers. He has a homework assignment asking for calculate the squares and cubes of integers. You are asked to write a program to verify the answers of his math homework.
● Chinese
阿里是一位正在學習整數乘法的小學生 。他有一個算整數平方與立方的作業。本題要求你寫一程式來驗證他的答案。
Technical Specification
● English
  • All the given numbers are integers and there is no sign.
  • The range of numbers is from 1 to 100.
● Chinese
    • 每個所給數字皆為整數且無正負符號
    • 每個數字的大小是 1 到 100
    Input Format
    ● English
    The first line is an integer which indicates the number of test cases. Each test case is a number in one line. There are at most 10 cases.
    ● Chinese
    第一行是一個整數代表測試資料有幾筆。每一筆測試資料都給定一個數值。至多有十組測資。
    Output Format
    ● English
    For each test case, output the square and cube of the given number in a line.
    ● Chinese
    針對每一筆測試資料,在一行中輸出給定數值的平方及立方值並以一個空格隔開。
Example

    Sample Input:Sample Output:
    2
    4
    5
    16 64
    25 125





沒有留言:

張貼留言

注意:只有此網誌的成員可以留言。