一只小书呆
一只小书呆
全部文章
分类
归档
标签
去牛客网
登录
/
注册
一只小书呆的博客
全部文章
(共17篇)
题解 | #猜数#
x, y = map(int,input().split()) if 2 * x <= y: print(0) elif x < y: tmp = (2*x-y+1)//2 print(tmp) else: tmp = (y-1)//2 prin...
2023-09-12
0
300
题解 | #正三角形的顶点位置#
import math T = int(input()) for _ in range(T): x1, y1, x2, y2 = map(float, input().split()) n_x = x2 - x1 n_y = y2 - y1 cos_60 = mat...
2023-09-11
0
270
题解 | #蘑菇阵#
while True: try: m,n,k = map(int, input().split()) mogu = set() for _ in range(k): x,y = map(int, input().spli...
2023-09-11
0
293
题解 | #编码#
s = input() n = len(s) if n == 1: x = ord(s) - 97 print(x * (1+25+25**2+25**3)) elif n == 2: x1 = ord(s[0]) - 97 x2 = ord(s[1]) - 9...
2023-09-09
0
250
题解 | #第二快/慢用时之差大于试卷时长一半的试卷#
select exam_id, duration, release_time from ( select t1.exam_id, e.duration, e.release_tim...
2023-09-08
1
255
题解 | #统计复旦用户8月练题情况#
select t1.device_id, t1.university, sum(if(t2.result is null,0,1)) as question_cnt, sum(if(t2.result='right',1,0)) as right_question_cnt from (select ...
2023-08-28
0
292
题解 | #字符统计#
import collections s = input() cou = collections.Counter(s) y = sorted(cou.keys(), key=lambda x: (-cou[x], ord(x))) print(''.join(y))
2023-08-13
0
254
题解 | #表示数字#
while True: try: s = input() n = len(s) i = 0 res = [] while i < n: if s[i].isdigit(): ...
2023-08-12
0
276
题解 | #24点运算#
s = [0,'A','2','3','4','5','6','7','8','9','10','J','Q','K'] # 使用深度优先搜索,按照全排列的方式进行加减乘除 def fun(x,visited,temp,res): if not any(visited): ...
2023-08-12
0
283
题解 | #扑克牌大小#
t1, t2 = input().split('-') x = t1.split() y = t2.split() signs = ['3','4','5','6','7','8','9','10','J','Q','K','A','2','joker', 'JOKER'] # 1、判断是否有对...
2023-08-12
0
295
首页
上一页
1
2
下一页
末页