想去三亚看海的梅花鹿刷牛客
想去三亚看海的梅花鹿刷牛客
全部文章
题解
归档
标签
去牛客网
登录
/
注册
想去三亚看海的梅花鹿刷牛客的博客
全部文章
/ 题解
(共8篇)
题解 | #进制转换#
1、从个位数加起,所以首先对输入的字符串进行倒序N[::-1] 2、累加时注意加权,依次为1、16、16*16、…… 3、循环完输出结果 4、当然在python的世界里有一句函数可以结束本例子 print(int(input(),16) 备注:int(str,N),N代表输入的数据是几进制的。 类似...
Python3
2022-03-23
0
283
题解 | #完全数计算#
import math def factorlist(num): li1=[] # print (num,int(math.sqrt(num)) tem=int(math.sqrt(num))+1 for i in range(1,tem): if n...
Python3
2021-10-30
0
375
题解 | #称砝码#
while True: try: n=int(input()) li1=list(map(int,input().split())) li2=list(map(int,input().split())) # print (li2...
Python3
2021-10-29
1
611
题解 | #字符串合并处理#
def dealstr(s): str1='' str2='' li1=[] li2=[] for i in range(len(s)): if i%2==0: s...
Python3
2021-10-29
0
406
题解 | #字符串合并处理#
def dealstr(s): str1='' str2='' li1=[] li2=[] for i in range(len(s)): if i%2==0: s...
Python3
2021-10-28
0
343
题解 | #字符串加解密#
def encrypt(s): st='' for item in s: if item=='Z': st+="a" continue if item=="z": st+='A' ...
Python3
2021-10-28
7
700
题解 | #坐标移动#
import sys import re x,y=0,0 cmd_list = sys.stdin.readline().strip().split(';') fun={ 'A':lambda a,b,p:(a-p,b), 'D':lambda a,b,p:(a+p,b), ...
Python3
2021-10-28
1
362
题解 | #坐标移动#
while True: try: str1=input() &...
Python3
2021-10-27
0
394