Skip to content

A number from input · ⁨读入一个数⁩

English

A number from input

Read a whole number and print it doubled. For the input 7, print 14.

⚠️ input() always gives back text, even when you typed digits — "7" * 2 is "77". Wrap it in int(...) to get a number you can do arithmetic with.

中文

读入一个数

读取一个整数,打印它的两倍。输入 7 时,打印 14。

⚠️ input() 永远返回文字,哪怕你输入的是数字 —— "7" * 2 得到的是 "77"。用 int(...) 包起来,才能得到可以做运算的数。

Log in or create account · ⁨登录或创建账户⁩

IGCSE, A-Level · ⁨IGCSE、A-Level⁩ & AP · ⁨与 AP⁩