#L0003. 交换变量值

交换变量值

1. Description

Swap the value of two integers and output

2. Input & Output

Input:

  • Use input() as input. Notice that the value you get from input() is a string
  • Refering code below to load multiple inputs
s = input().split(" ")

# 读取第一个输入,如果想要读入整数,就通过 int() 把它变成整数
input_1 = int(s[0])

# 读取第二个输入,不需要数字时,就保留字符串
input_2 = s[1]

Output:

  • Use print() for your output
  • Your output numbers should be separated by space

Example

# Input: 
10 20
# Output: 
20 20
# Input: 
15 999
# Output: 
999 15