data = list(map(int, input().strip().split()))
a, b = data[0], data[1]
print(a+b)
# 给定一个长度为n的数列,将这个数列按从小到大的顺序排列。1<=n<=200
n = int(input())
num = list(map(int, input().strip().split()))
num.sort()
for i in range(0,n-1):
print(num[i],end=" ")
print(num[n-1])
(1条消息) Python进制转换详细介绍_Wonderful-CSDN博客_python进制转换https://blog.csdn.net/weixin_43353539/article/details/89444838
# 给定n个十六进制正整数,输出它们对应的八进制数
n = int(input())
for case in range(n):
num = input()
print(oct(int(num,16))[2:])
# 从键盘输入一个不超过8位的正的十六进制数字符串,将它转换为正的十进制后输出。
num = input()
print(int(num,16))
# 十六进制数是在程序设计时经常要使用到的一种整数的表示方式。它有0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F共16个符号,分别表示十进制数的0至15。十六进制的计数方法是满16进1,所以十进制数16在十六进制中是10,而十进制的17在十六进制中是11,以此类推,十进制的30在十六进制中是1E。
# 给出一个非负整数,将它表示成十六进制的形式。
num = input()
print(hex(int(num))[2:].upper())
(1条消息) python编程—回文数判断_sura_1988的博客-CSDN博客_回文数python编程https://blog.csdn.net/weixin_43314056/article/details/86498970
# 123321是一个非常特殊的数,它从左边读和从右边读是一样的。
# 输入一个正整数n, 编程求所有这样的五位和六位十进制数,满足各位数字之和等于n 。
def huiwen(num):
number = str(num)
if(number[:] == number[::-1]):
return True
else:
return False
def sum_str(num):
#print(num)
sum = 0
while num:
sum = sum + num % 10
num = num // 10
return sum
n = int(input())
for num in range(10000,999999):
if(huiwen(num) and sum_str(num) == n):
print(num)
def huiwen(num):
number = str(num)
if(number[:] == number[::-1]):
return True
else:
return False
for i in range(1000,10000):
if(huiwen(i)):
print(i)
def shuixianhua(num):
ge = num%10
shi = num//10%10
bai = num//100
if(num == ge*ge*ge + shi*shi*shi +bai*bai*bai):
return True
else:
return False
for i in range(100,1000):
if(shuixianhua(i)):
print(i)
n = int(input())
a = [[0 for i in range(n)] for j in range(n)]
a[0][0] = 1
for i in range(1,n):
a[i][0] = 1
a[i][i] = 1
for i in range(2,n):
for j in range(1,i):
a[i][j] = a[i-1][j] + a[i-1][j-1]
for i in range(0,n):
for j in range(0,i):
print(a[i][j],end=" ")
print(a[i][i])
n = int(input())
list1 = list(map(int, input().strip().split()))
num = int(input())
k = -1
for i in range(0,n):
if(num == list1[i]):
k = i+1
break
print(k)
# 求数列的最大值、最小值、和
n = int(input())
a = list(map(int,input().strip().split()))
a.sort()
sum = 0
for i in range(n):
sum = sum + a[i]
print(a[n-1])
print(a[0])
print(sum)
n,m = list(map(int,input().strip().split()))
s = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
for i in range(0,n):
k = i
for j in range(0,i):
if(j < m):
print(s[k],end='')
k = k - 1
k = 0
for j in range(i,m):
print(s[k],end='')
k = k + 1
print()
print("00000")
print("00001")
print("00010")
print("00011")
print("00100")
print("00101")
print("00110")
print("00111")
print("01000")
print("01001")
print("01010")
print("01011")
print("01100")
print("01101")
print("01110")
print("01111")
print("10000")
print("10001")
print("10010")
print("10011")
print("10100")
print("10101")
print("10110")
print("10111")
print("11000")
print("11001")
print("11010")
print("11011")
print("11100")
print("11101")
print("11110")
print("11111")
y = int(input())
if((y % 4 == 0 and y % 100 != 0) or (y % 400 == 0)):
print("yes")
else:
print("no")
n = int(input())
f1 = f2 = 1
if n<3:
f = 1
else:
f = f1 + f2
for i in range(2,n-1):
f1 = f2
f2 = f
f = (f1 + f2)%10007
print(f)
import math
r = int(input())
s = math.pi * r * r
print('%.7f'%s)
## '%.2f' % a
n = int(input())
print(((1+n)*n)//2)
嗷,研究生的寒假那叫放假吗?嘤嘤嘤~~~
主要是吧,不知道干啥。我闺蜜都在上班,刷b站晚上好多个小时可以刷,最近在看鬼灭,呜呜呜,大哥死得好惨。。。。
减肥事业持续中。。。。
自我疗愈持续中。。。。。