XiaoBY
XiaoBY
全部文章
分类
归档
标签
去牛客网
登录
/
注册
XiaoBY的博客
全部文章
(共48篇)
题解 | 计算日期到天数转换
import sys a, b, c = map(int, input().split()) total = 0 runyear_day = [31,29,31,30,31,30,31,31,30,31,30,31] pingyear_day = [31,28,31,30,31,30,31,3...
2025-06-09
0
51
题解 | 百钱买百鸡问题
import sys gongji = 0 muji = 0 xiaoji = 0 while gongji <= 20: while muji <= 33: while xiaoji <= 300: if 5*gongji + ...
2025-06-09
0
59
题解 | 查找输入整数二进制中1的个数
import sys n = int(input()) m = int(input()) def f(x): count = 0 if x == 0: return count else: while x > 0: ...
2025-06-09
0
36
题解 | 查找组成一个偶数最接近的两个素数
import sys def zhishu(x): #先判断两个数是否为质数 for i in range(2, x): if x % i == 0: return False return True n = int(input()) a...
2025-06-08
0
45
题解 | 统计字符
import sys s = input() count1 = 0 count2 = 0 count3 = 0 count4 = 0 for i in s: if 97 <= ord(i) <= 122: count1 += 1 elif ord(i...
2025-06-07
0
36
题解 | 图片整理
import sys s = input() s = list(s) s.sort() str1 = '' for i in s: str1 += i print(str1)
2025-06-07
0
70
题解 | 单词倒排
import sys import re sentence = input() sentence = re.split(r'\W+', sentence) # 以非字母分割字符串 sentence = ' '.join(reversed(sentence)) for i in sent...
2025-06-07
0
36
题解 | 字符串分隔
import sys s = input() while len(s) > 8: print(s[:8]) s = s[8:] if len(s) < 8: s += "0" * (8 - len(s)) print(s)
2025-06-02
0
65
题解 | 获取有奖金的员工相关信息。
select e.emp_no, first_name, last_name, btype, salary, ( case btype when 1 then round(0.1*salary,1) ...
2024-12-22
0
110
题解 | 获取所有非manager员工当前的薪水情况
select de.dept_no, de.emp_no, s.salary from dept_emp de inner join employees e on de.emp_no = e.emp_no inner join dept_manager...
2024-12-22
0
62
首页
上一页
1
2
3
4
5
下一页
末页