我知我心
我知我心
全部文章
分类
acm(8)
c++(10)
c语言(29)
django(14)
html,css(9)
javascript(3)
linux(3)
python(30)
剑指offer(6)
动态规划(6)
工具(3)
数据库(2)
数据结构(12)
贪心算法(8)
归档
标签
去牛客网
登录
/
注册
我知我心的博客
全部文章
(共143篇)
python文件和异常
#encoding:utf-8 #读取文件 '''关键字with在不再需要访问文件时将其关闭''' with open('pi_digits.txt') as file_object: contents = file_object.read() #read()把文件的全部内容读取成一个...
2020-08-21
0
520
python3单行定义多个变量或赋值
个人博客页面链接:http://www.shihao.online/(django搭建的个人博客,还在完善中) #encoding:utf-8 #一行内将多个值赋值给多个变量 a, b = 45, 65 print(a, b) #交换两个数的值 a, b = b, a #元组交换 ''...
2020-08-21
0
390
python中如何实现一行输入多个值
个人博客页面链接:http://www.shihao.online/(django搭建的个人博客,还在完善中) #encoding:utf-8 lst= list(map(int,input().split())) ''' 先使用split()方法对字符串切片,然后使用map()将每个元素依次...
2020-08-21
0
469
珠心算测验(ACM)
python3做法: n = int(input()) lst= list(map(int,input().split())) times = [] for i in lst: for j in lst: if i < j and i + j in lst and i...
2020-08-21
0
565
谁拿到了最多奖学金
c语言做法: #include<stdio.h> typedef struct { char name[20]; //姓名 int grade1; //平均成绩 int grade2; //班级评议成绩 char p; ...
2020-08-21
0
703
python3之输入输出格式
个人博客页面链接:http://www.shihao.online/(django搭建的个人博客,还在完善中) #encoding:utf-8 #有多组输入数据,但组数不确定 while True: try: a, b = map(int, input().split('...
2020-08-21
0
765
外星人入侵游戏(Python3)
个人博客页面链接:http://www.shihao.online/(django搭建的个人博客,还在完善中) 外星人入侵游戏 github源码:https://github.com/shihao1010/alien_invasion alien_invasion.py: #encoding:...
2020-08-21
0
629
乒乓球(python3做法)
#encoding:utf-8 lst = [] lst1 = [] s = 0 while True: lst1 = list(input()) for i in lst1: if i != 'E': lst.append(i) ...
2020-08-21
0
527
使用matplotlib绘制简单的折线图
个人博客页面链接:http://www.shihao.online/(django搭建的个人博客,还在完善中) #encoding:utf-8 #使用matplotlib绘制简单的折线图 import matplotlib.pyplot as plt #绘制简单的折线图 squares = [...
2020-08-21
0
543
循环队列的基本操作
VC6.0下写的: #include<stdio.h> #include<stdlib.h> #define MAXSIZE 100 typedef char datatype; typedef struct { datatype *base; //存储空间...
2020-08-21
0
735
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页