【打卡】位运算左移三位(Python 入门)

描述
请从标准输入流(控制台)中获取一个自然数 n,请通过 print 语句输出 n 左移三位后的结果到标准输出流(控制台)。

0 ≤ n ≤ 10000 0 ≤n≤100000n10000

样例
评测机会通过执行命令 python main.py 来执行你的代码。你的代码需要从标准输入流(控制台)中读入数据 n,计算出结果并打印到标准输出流(控制台)中。

样例一

当 n = 1 时,程序执行打印出的结果为:

8

样例二

当 n = 0 时,程序执行打印出的结果为:

0
# write your code here
# read data from console

# output the answer to the console according to the requirements of the question
n = int(input())
print(n << 3)

版权声明:本文为weixin_44708254原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。