02 2020 档案
摘要:小兔子喜欢蹦蹦跳跳上楼梯 ,它能一次跳1阶楼梯,也能一次跳上2阶楼梯。问小兔子要上一个n阶的楼梯,最多有多少种不同上楼的走法? 输入格式: 输入一行包含一个整数 n,表示有几阶楼梯。 输出格式: 上楼梯的走法数 输入样例: 3 输出样例: 3 n=int(input()) def fib(n): i
阅读全文
摘要:输入一个字符串,将这个字符串中所有的空格删除 输入格式: 输入一个字符串 输出格式: 输出删除空格后的字符串 输入样例: i am a boy! you are a girl! 输出样例: iamaboy!youareagirl! ss=input() ss=ss.replace(' ', '')
阅读全文
摘要:输入一句英文,整句英文有4个单词,只有最后一个句号。输出最长的单词。如果有多个单词长度一样,输出第一个。 输入格式: 一句英文,整句英文有4个单词。整句英文只有最后一个标点符号。 输出格式: 句子中最长的单词 输入样例: i am a boy! 输出样例: boy s=input() s1='' f
阅读全文
摘要:输入一个字符串s,一个数字n和一个字符c,统计这个字符c在字符串s中第n次出现的位置 输入格式: 输入3行。第1行是字符串s,第2行是数字n,第3行是被查找的字符c。 输出格式: 第n个字符在字符串中的位置值。如果字符串中不存在第n个字符c,打印出'no' 输入样例: abcabcabc 2 a 输
阅读全文
摘要:输入一个字符串,输出最后一个字符 输入格式: 输入1个字符串 输出格式: 最后一个字符 输入样例: 12345678 输出样例: 8 print(input()[-1])
阅读全文
摘要:输入一个数字的字符串和一个数字字符(1到9),统计这个数字在字符串中出现的次数,并累加。例如有个字符串是1234321,查找2这个数字,在字符串中出现了2次,所以累计和就是2+2=4 输入格式: 输入2行。第1行是字符串,第2行是要查找的数字。 输出格式: 指定数字出现的累加和 输入样例: 1234
阅读全文
摘要:小杨是班里新高一的班长,班主任王老师给小杨布置了一个任务,要求将班 里男生和女生分别从矮到高排序,女生排在男生前面。 输入格式: 第一行输入一个正整数 n,表示班级的人数,1<=n<=5000。 第二行输入 n 个整数,表示班级每个人的身高,单位 cm。 第三行输入 n 个数,0 表示男生,1 表示
阅读全文
摘要:输入一个正整数n (n>4),再输入n个实数,求出歌手的得分(保留2位小数)。设一歌唱评奖晚会上有n(n>4)个评委为歌手打分.评分规则:每个评委依次打分,再去掉2个最高分和2个最低分,计算余下的分数平均值为歌手的得分. 输入格式: 在第一行中输入n 在第二行中输入n个分数 输出格式: 在一行中输出
阅读全文
摘要:输入一个字符串和一个字符,统计这个字符在字符串中出现的次数 输入格式: 输入2行。第1行是字符串,第2行是要查找的字符。 输出格式: 字符出现的次数 输入样例: abcdefgabcdefg a 输出样例: 2 a=input() b=input() def CountAa(s): return s
阅读全文
摘要:字典合并。输入用字符串表示两个字典,输出合并后的字典,字典的键用一个字母或数字表示。注意:1和‘1’是不同的关键字! 输入格式: 在第一行中输入第一个字典字符串 在第二行中输入第二个字典字符串 输出格式: 在一行中输出合并的字典,输出按字典序。"1"的ASCII吗为49,大于1,排序时1在前,"1"
阅读全文
摘要:本题要求计算下列分段函数f(x)的值(x为从键盘输入的一个任意实数): 输入格式: 直接输入一个实数x 输出格式: 在一行中按“f(x)=result”的格式输出,其中x与result都保留三位小数。 输入样例: 3.14 输出样例: f(3.140)=0.865 import math x = f
阅读全文
摘要:输入 1 个正整数 n(1≤n),再按行读入 n 阶方阵 a 和 b, 生成并输出 n 阶方阵 c,c 中的元素是 a 和 b 对应元素的和. c[i][j]=a[i][j]+b[i][j] i,j=0,1,2...n-1(1<=c[i]<=99) 输入格式: 在第一行输入n 在第二行输入a方阵 在
阅读全文
摘要:小丽对数位中含有 2、0、1、9 的数字很感兴趣(不包括前导 0),在 1 到 40 中这样的数包括 1、2、9、10 至 32、39 和 40,共 28 个,他们的和是 574。 请问,在 1 到 n 中,所有这样的数的和是多少? 输入格式: 输入一行包含一个整数 n。 输出格式: 输出一行,包含
阅读全文
摘要:输入一端英文,由多个句子组成。每个句子肯定以句号'.'结束。请把第1个句子的首字母大写,把第2个句子的每个单词的首字母大写。删除其他句子。 输入格式: 输入一段英文。该段英文至少2句。 输出格式: 修改后的英文段落。输出的字符串前后无空格。 输入样例: i am a student. i like
阅读全文
摘要:输入一个字符串,判断是否头尾对应的。比如字符串'abcba'就是头尾对应的。比如字符串'+-**-+',也是头尾对应的。比如字符串'abcbb'就不是头尾对应的。 输入格式: 输入一个字符串 输出格式: 如果头尾对应,输出'yes' 否则输出'no' 输入样例: abcba 输出样例: yes s1
阅读全文
摘要:输入2个字符串,判断其中一个字符串是否是以另一个字符串结尾 输入格式: 输入2行,每行一个字符串数据 输出格式: 如果第1个字符串以第2个字符串结尾,输出第2个字符串 如果第2个字符串以第1个字符串结尾,输出第1个字符串 如果两个字符串互为对方的结尾字符,输出'all' 如果都不满足,输出'no'
阅读全文
摘要:从键盘输入一个学生所有课程的成绩,输入格式为”课程名:成绩“,每门课占一行,以空行结束。随后提示”请输入要查询的课程:“,用户从键盘输入课程名,查询并输出该课程的成绩,要求进行异常处理,对不存在的课程进行捕捉处理。 输入格式: 输入学生所有课程的成绩,每门课占一行,格式为”课程名:成绩“,以空行结束
阅读全文
摘要:所谓“厉害”数,是指其各位数字的5次方等于该数本身。编程输出所有长度不超过n位的正整数中的“厉害”数。 例如:4151=1 输入格式: 一个整数n (1<=n<=6) 输出格式: 每行一个“厉害”数 输入样例: 4 输出样例: 1 4150 4151 n=int(input()) for i in
阅读全文
摘要:输入三角形的三边,判断是否能构成三角形。若能构成输出yes,否则输出no。 输入格式: 在一行中直接输入3个整数,3个整数之间各用一个空格间隔,没有其他任何附加字符。 输出格式: 直接输出yes或no,没有其他任何附加字符。 输入样例1: 3 4 5 输出样例1: yes 输入样例2: 1 2 3
阅读全文
摘要:首先.我们做好一张母盘.并将操作系统目录里的TEMP目录里的东西,以及临时文件夹全部清空.之后将母盘系统备份到另外一块硬盘上. 首先确认备份的系统有一个比较大的分区.并确认能装下你的硬盘备份. 将准备好的另外一块硬盘挂在你做好的机器上.之后重新启动到DOS模式,启动GHOST. 选择LOCAL→DI
阅读全文
摘要:VSAN配置手册 1. 配置前的基本准备工作 1.1. 手动将磁盘标记为SSD磁盘 在某些情况下,当在RAID配置中将一个SSD配置为RAID-0模式后,vSphere只将这个磁盘当作一个普通的HDD盘,而不能将它正确地识别为SSD盘。出现这种情况的时候,就需要通过命令行方式手动将这个磁盘标记为“S
阅读全文
摘要:对于树莓派串口进行设置,是因为我想用树莓派与外部设备连接,即将串口设置为通用串口。 1、关闭板载蓝牙功能 首先,打开你的Terminal,输入一下语句: sudo systemctl disable hciuart 然后,编辑文档/lib/systemd/system/hciuart.service
阅读全文
摘要:树莓派程序开机启动设置。 关于开机启动,我在网上找的一个教程,然后照着做了一次。 需要开机启动的程序是自己写的 我的是一个数据传输的程序,名字为 trans.py 开机启动脚本,保存在/etc/init.d目录下面: #!/bin/bash # /etc/init.d/trans ### BEGIN
阅读全文
摘要:一、配置中文环境 给树莓派安装中文环境 虽然有人说学习Linux最好是全E文,无图形界面模式, 不过个人还是比较喜欢中文的环境多些,嘿嘿 给树莓派安装中文环境前提是已经连接网络, 不然这些东西可下载不了的。 命令步骤“ 首先当然是启动PI,然后登陆进去。 接下来: 输入 sudo apt-get u
阅读全文
摘要:你需要以下这些东西: 一张Micro SD记忆卡 一个SD读卡器,用于将系统映像写入到Micro SD卡中供电来源。我们用的是一个旧的安卓手机充电器,你需要一个5V的micro USB接口充电器为它供电。 如果你是用的普通显示器而不是高清电视,你需要一条HDMI连接线与HDMI-DVI转换器。如果你
阅读全文
摘要:1、安装当然可以使用vi或nano,本文使用vim(命令行) sudo apt-get install vim 2、编辑apt的配置文件(命令行) sudo vim /etc/apt/sources.list 按insert键进入编辑模式,删除(或注释)原内容或备份文件,然后变更为,粘贴为Ctrl+
阅读全文
摘要:一、准备材料。 arduion nano单片机 15RMB 超声波传感器(HC-HR04) 5RMB 9G舵机(三线) 10RMB 电烙铁(40-60W) 10RMB 杜邦线(公对公、母对母、公对母) 10RMB MINI USB 3RMB 热熔胶枪 20RMB Arduion ide 官网下载 免
阅读全文
摘要:周期为2l的周期函数的傅立叶级数 微分方程的相关概念 一阶线性微分方程 全微分方程 二阶微分方程 二阶常系数齐次线性微分方程及其解法 二阶常系数非齐次线性微分方程 (*)式的通解 两个不相等实根 两个相等实根 一对共轭复根 二阶常系数非齐次线性微分方程
阅读全文
摘要:斯托克斯公式——曲线积分与曲面积分的关系 常数项级数 级数审敛法 绝对收敛与条件收敛 幂级数 函数展开成幂级数 一些函数展开成幂级数 欧拉公式 三角级数 傅立叶级数
阅读全文
摘要:重积分及其应用 柱面坐标和球面坐标 曲线积分 曲面积分 高斯公式
阅读全文
摘要:定积分的近似计算 定积分应用相关公式 空间解析几何和向量代数 多元函数微分法及应用 微分法在几何上的应用 方向导数与梯度 多元函数的极值及其求法
阅读全文
摘要:导数公式: 基本积分表: 三角函数的有理式积分: 一些初等函数: 两个重要极限: 三角函数公式: ·诱导公式: 函数 角A sin cos tg ctg -α -sinα cosα -tgα -ctgα 90°-α cosα sinα ctgα tgα 90°+α cosα -sinα -ctgα
阅读全文
摘要:Eva would like to buy a string of beads with no repeated colors so she went to a small shop of which the owner had a very long string of beads. Howeve
阅读全文
摘要:1.Practice makes perfect.熟能生巧。 2.God helps those who help themselves.天助自助者 3.Easier said than done.说起来容易做起来难。 4.Where there is a will,there is a way.有
阅读全文
摘要:There are currently 168 internationally recognized unique national currencies in this world. But let us assume that we have business with other specie
阅读全文
摘要:Werewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human beings. Suppose that in a game, player #1
阅读全文
摘要:Given a string which contains only lower case English letters, how many different strings you can get after deleting AT MOST TWO characters in it? Inp
阅读全文
摘要:Given a positive integer N, let us define a subnumber of N as a consecutive number of digits NOT starting with 0. For example if 0, it has 7 subnumber
阅读全文
摘要:Given any weighted undirected graph, there exists at least one minimum spanning tree (MST) if the graph is connected. Sometimes the MST may not be uni
阅读全文
摘要:Image segmentation is usually formulated as a graph partition problem, where each segment corresponds to a connected component. Moreover, each pixel i
阅读全文
摘要:When a rectangle is cut by a straight line, we can easily obtain two polygons as the result. But the reversed problem is harder: given two polygons, y
阅读全文
摘要:Given a map of airline routes, you are supposed to check if a round trip can be planned between any pair of cities. Input Specification: Each input fi
阅读全文
摘要:Given the partial results of a binary tree's traversals in in-order, pre-order, and post-order. You are supposed to output the complete results and th
阅读全文
摘要:Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of b
阅读全文
摘要:As the manager of your company, you have to carefully consider, for each project, the time taken to finish it, the deadline, and the profit you can ga
阅读全文
摘要:Given a list of N integers A1, A2, A3,...AN, there's a famous problem to count the number of inversions in it. An inversion is defined as
阅读全文
摘要:It is vitally important to have all the cities connected by highways in a war. If a city is conquered by the enemy, all the highways from/toward that
阅读全文
摘要:After finishing her tour around the Earth, CYLL is now planning a universal travel sites development project. After a careful investigation, she has a
阅读全文
摘要:Programmers often have a preference among program constructs. For example, some may prefer if(0==a), while others may prefer if(!a). Analyzing such pa
阅读全文
摘要:There is a kind of binary tree named red-black tree in the data structure. It has the following 5 properties: (1) Every node is either red or black. (
阅读全文
摘要:According to Wikipedia: "In mathematics and in particular in combinatorics, the Lehmer code is a particular way to encode each possible permutation of
阅读全文
摘要:Have you ever played the game "Greedy Snake"? In the game, we control the movements of the snake to eat the fruits scattered in the game field, while
阅读全文
摘要:A circle of friends is a network of friend relationships. If A is a friend of B, then B is considered a friend of A no matter B admits or not, and the
阅读全文
摘要:Here is a simple intersting letter-moving game. The game starts with 2 strings S and T consist of lower case English letters. S and T contain the same
阅读全文
摘要:In many research areas, one important target of analyzing data is to find the best "peak shape" out of a huge amount of raw data full of noises. A "pe
阅读全文
摘要:There are some animals in a zoo which can be described as a grid with N rows and M columns. Your task is to place some obstacles so that no pairs of a
阅读全文
摘要:There are a lot of tips telling us that some fruits must not be eaten with some other fruits, or we might get ourselves in serious trouble. For exampl
阅读全文
摘要:An n-gon is a polygon with n sides. For example, a triangle is a 3-gon. Now you are asked to find the best n-gon in a given convex N-gon. The vertices
阅读全文
摘要:Given a string which contains only lower case letters, how many different non-empty strings you can get if you can keep AT MOST 100 characters in the
阅读全文
摘要:Larry just studied the algorithm to count number of inversions. He's very interested in it. He's considering another problem: Given a permutation of i
阅读全文
摘要:真的没骗你,这道才是简单题 —— 对任意给定的不超过 10 的正整数 n,要求你输出 2n。不难吧? 输入格式: 输入在一行中给出一个不超过 10 的正整数 n。 输出格式: 在一行中按照格式 2^n = 计算结果 输出 2n 的值。 输入样例: 5 输出样例: 2^5 = 32 1 i
阅读全文
摘要:这次真的没骗你 —— 这道超级简单的题目没有任何输入。 你只需要在一行中输出事实:This is a simple problem. 就可以了。 输入样例: 无 输出样例: This is a simple problem. 1 print("This is a simple problem.")
阅读全文
摘要:这道超级简单的题目没有任何输入。 你只需要把这句很重要的话 —— “I'm gonna WIN!”——连续输出三遍就可以了。 注意每遍占一行,除了每行的回车不能有任何多余字符。 输入样例: 无 输出样例: I'm gonna WIN! I'm gonna WIN! I'm gonna WIN! 1
阅读全文
摘要:这道超级简单的题目没有任何输入。 你只需要把这句很重要的话 —— “I Love GPLT”——竖着输出就可以了。 所谓“竖着输出”,是指每个字符占一行(包括空格),即每行只能有1个字符和回车。 输入样例: 无 输出样例: I L o v e G P L T 注意:输出的两个空行中各有一个空格。 f
阅读全文
摘要:一群人坐在一起,每人猜一个 100 以内的数,谁的数字最接近大家平均数的一半就赢。本题就要求你找出其中的赢家。 输入格式: 输入在第一行给出一个正整数N(≤)。随后 N 行,每行给出一个玩家的名字(由不超过8个英文字母组成的字符串)和其猜的正整数(≤ 100)。 输出格式: 在一行中顺序输出:大家平
阅读全文

浙公网安备 33010602011771号