|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 sfqxx 于 2023-2-6 15:01 编辑
他们见你们那么厉害,只好把你们带到关押zhangjinxuan的位置
没想到,这里还设了3道题目?!
那么,请作答
第一题(水题)
(非原创)如果你在Idle种不小心把内置函数赋值了,那么如何撤销呢?
请至少说出2种有效方法
第二题:(原创)在python种如何用代码在一行内输入2个数字,中间有空格
例子:
(2)那3个数呢?
第三题:实验题
上题目!
字幕君累了,见这个网页(注:需要登陆)
没登陆看这→https://www.luogu.com.cn/
登陆了看这→https://www.luogu.com.cn/problem/P9033?contestId=98078
奖励随机,没有答案!
制作不易,评个分呗 (VIP不扣荣誉和贡献的啦)
1. https://fishc.com.cn/forum.php?m ... 138&pid=6137054
2. a, b = map(int, input().split())
3. - def ten_to_two(x):
- return bin(x)[2:]
- def two_to_ten(x):
- return int(x, 2)
- def solve(a, b, c):
- if b > c:
- if two_to_ten('1' + (len(ten_to_two(b))-1) * '0') > c or a == 1:
- print(-1)
- return
- print(two_to_ten('1' + (len(ten_to_two(b))-1) * '0'), two_to_ten(ten_to_two(b)[1:]), end = ' ')
- print(*([0] * (a-2)))
- return
- if b <= c:
- print(b, end = ' ')
- print(*([0] * (a-1)))
- return
- n = int(input())
- for i in range(n):
- a, b, c = map(int, input().split())
- solve(a, b, c)
复制代码
感觉还是 @zhangjinxuan 发的贴比较好 
|
|