USACO/power

来自"NOCOW"

跳转到: 导航, 搜索
USACO/power需要翻译,您可以帮助翻译这个条目或在讨论页讨论。当翻译完成时,请移除这个模板。
[Traditional]

Powers of two are just so easy to calculate. To find the Nth power of 2,
just multiply 2 by itself N times (where 2 to the 0th power is 1 and 2 to
the 1st power is 2).  Thus, we have a power table:

    N    2 to the Nth power
    2         4
    5        32
   10      1024

Write a program that reads N (1 <= N <= 30) and prints 2 to the Nth power.
Do not use a table of precalculated numbers in your program.

PROBLEM NAME: power

INPUT FORMAT:

A single line with integer N.

SAMPLE INPUT (file power.in):

10

OUTPUT FORMAT:

A single line with 2 to the Nth power.

SAMPLE OUTPUT (file power.out):

1024
个人工具