Sss+
Sss+
全部文章
题解
归档
标签
去牛客网
登录
/
注册
Sss+的博客
WT......
全部文章
/ 题解
(共14篇)
题解 | #大吉大利,今晚吃鸡#
目标是更好的解释 import sys cnt=0 def hanoi(n): global cnt # 最终状态判断,当无盘需要移动时停止 # 注意实际上最后一步的移动是之前移动的子集 # 不用自增cnt if(n==0): return ...
Python3
2022-03-09
0
521
题解 | #牛牛的10类人#
import sys n = [i.strip().split() for i in sys.stdin.readlines()] cnt = int(n[0][0]) num = list(map(int, n[1])) for i in num: s = f'{i:b}' ze...
Python3
2022-03-09
0
299
题解 | #牛牛的数组匹配#
没人写双百分百doge import sys n = [i.strip().split(' ') for i in sys.stdin.readlines()] sz = list(map(int, n[0])) a = list(map(int, n[1])) b = list(map(int,...
Python3
2022-03-09
0
460
题解 | #The Biggest Water Problem#
笑了这题目 n=input() def balalaMagic(s): sumNum=0 for i in s: sumNum+=int(i) return str(sumNum) while not (int(n)<10 and int(n)>...
Python3
2022-03-09
1
372
题解 | #井字棋#
import sys def checkWinState(cx, cy, d): try: flag1=d[cx][cy]==d[cx-1][cy] and d[cx][cy]==d[cx+1][cy] if(cx-1<0 or cx+1>=3)...
Python3
2022-03-08
0
401
题解 | #回型矩阵#
有限状态机 n = int(input()) s=[[-1 for i in range(n)] for i in range(n)] cnt=0 direction = [[0, 1], [1, 0], [0, -1], [-1, 0]] # 0 1 = right # 1 0 = down #...
Python3
2022-03-08
2
496
题解 | #带空格直角三角形图案#
import sys n=[int(i) for i in sys.stdin.readlines()] for j in n: for i in range(j): print(f"{'* '*(i+1): >{2*j}}")
Python3
2022-03-08
0
284
题解 | #[NOIP2015]金币#
import math k=int(input()) c=math.ceil(math.sqrt(2*k)) def get_salary_seq(): s=[] for i in range(c): for j in range(i+1): ...
Python3
2022-03-08
0
343
题解 | #小乐乐与进制转换#
num = int(input()) r=[] while num!=0: r.append(num%6) num=num//6 s=''.join(str(i) for i in r) print(s[::-1])
Python3
2022-03-08
0
294
题解 | #水仙花数#
import sys isTargetNum = lambda n:((n//100)**3+((n%100)//10)**3+(n%10)**3)==n s=[i.strip().split(' ') for i in sys.stdin.readlines()] result=[[] for ...
Python3
2022-03-08
0
339
首页
上一页
1
2
下一页
末页