1. x1, y1 = 1.2, 3.57 x2, y2 = 2.26, 8.7 print('{:-^40}'.format('输出1')) print('x1 = {}, y1 = {}'.format(x1, y1)) print('x2 = {}, y2 = {}'.format(x2, y ...
分类:
其他好文 时间:
2021-04-05 12:37:53
阅读次数:
0
task1 x1,y1=1.2,3.57 x2,y2=2.26,8.7 print("{:-^40}".format("输出1")) print("x1={},y1={}".format(x1,y1)) print("x2={},y2={}".format(x2,y2)) print("{:-^40 ...
分类:
其他好文 时间:
2021-04-05 12:32:08
阅读次数:
0
创建队列 #创建队列 queue=deque() #这里创建的是双端的 添加元素 #append()方法 O(1) queue.append(1) queue.append(2) queue.append(3) print(queue) #[1,2,3] 获取即将出队的元素 # O(1) temp1 ...
分类:
编程语言 时间:
2021-04-05 12:30:54
阅读次数:
0
这个问题主要是因为定义类的时候在类名后边加了个括号(); `public class Hello { public static void main(String[] args) { System.out.print("Hello World!"); System.out.println();//换 ...
分类:
其他好文 时间:
2021-04-05 12:26:42
阅读次数:
0
# print输出的几种用法 # 用法1:用于输出单个字符串或单个变量 print('hey, u') # 用法2: 用于输出多个数据项,用逗号分隔 print('hey', ' u') x = 1 y = 2 z = 3 print(x, y, z) # 用法3: 用户混合字符串和变量值 prin ...
分类:
其他好文 时间:
2021-04-05 12:15:12
阅读次数:
0
task1 print("hey,u")print("hey","u")x=1y=2z=3print(x,y,z)print("x=%d,y=%d,z=%d"%(x,y,z))print("x={},y={},z={}".format(x,y,z))print(f"x={x},y={y},z={z} ...
分类:
其他好文 时间:
2021-04-05 12:13:30
阅读次数:
0
1、import time 时间分为三种格式 1.1、时间戳 # 时间戳表示的是从1970年1月1日00:00:00开始按秒计算的偏移量。我们运行“type(time.time())”,返回的是float类型。 print(time.time()) # 1617280797.3197777 1.2、 ...
分类:
其他好文 时间:
2021-04-05 12:03:53
阅读次数:
0
import random print(random.random()) # (0,1) 随机小数 0到1 print(random.randint(3,5))# [3,4,5] 取整 print(random.randrange(3,5))# [3,5) 取整 print(random.choic ...
分类:
其他好文 时间:
2021-04-05 12:02:18
阅读次数:
0
hex() 函数用于将一个指定数字转换为 16 进制数。 语法:hex(x) # 返回一个整数,以 0x 开头。 示例代码: num = 100 print(hex(num)) # 0x64 ...
分类:
其他好文 时间:
2021-04-05 11:56:45
阅读次数:
0
XXVII.CF573E Bear and Bowling 考虑暴力的DP。设 \(f_{i,j}\) 表示前 \(i\) 个元素中选择长度为 \(j\) 的子序列所能得到的最大收益。 考虑由 \(f_i\) 转移到 \(f_{i+1}\)。明显,一共有两种转移方式:\(f_{i,j}\righta ...
分类:
其他好文 时间:
2021-04-05 11:56:10
阅读次数:
0