Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >

题目描述 (有附件) 解题观察打开网站: 输入 “abc“ 会看到: 然后我们来查看代码(routes.py): 1234567891011121314from flask import Blueprint, requestfrom flask_mako import render_templatefrom application.util import spookifyweb = Bl...

题目描述 思路利用一个index/指针来逐个匹配目标字符串 “hello”。从j=0开始,如果找到了j就加一。如果最后j=5的话就说明找到了。 代码C++12345678910111213141516171819202122232425262728#include <iostream>#include <string>using namespace std;int m...

题目描述 思路写2个函数,第一个判断一个数是否是(严格的)lucky number,第二个函数遍历所有的lucky number判断是否是当前n的因数。 代码C++12345678910111213141516171819202122232425262728293031#include <iostream>#include <string>using namespac...

Hello World老规矩还是先见识一下输出“Hello World!”: 12345678#include <iostream>using namespace std;int main(){ cout << "Hello World!"; return 0;} 注意几点: #include 这一部分和c是一样的...

题目描述 思路代码Python1234567891011121314word = input()V = ["A", "O", "Y", "E", "U", "I"]# deletes all the vowelsword = ''.join(c for c in word if c.upper() not in V)# replaces all uppercase consonants wi...

题目描述 思路先统计前 k 个分数中大于 0 的数量。因为分数是递减排列的,只需继续统计从第 k 个位置开始,所有与第 k 个分数相等的连续分数个数。最后的总合就是结果。 代码Python12345678910111213141516171819n_k = input().split()n = int(n_k[0])k = int(n_k[1])n_list = list(map(int, ...

题目描述 思路对于每一行命令检测+是否在里面就好。 代码Python123456789n = int(input())x=0for _ in range(n): op = input() if "+" in op: x += 1 else: x -= 1print(x) C1234567891011121314151617181920#inclu...

题目描述 一共有 n 道题目,而对于每道题,他们会选择是否去做这题:只有当三个人中至少有两个人对这题有把握时,他们才会决定去做。 思路直接计算每行的和是否大于等于2。 代码Python123456789n = int(input()) count = 0 for _ in range(n): a, b, c = map(int, input().split()) if a ...

题目描述 简单来讲就是需要”简化“长单词。 思路先判断单词长度。如果小于等于10就不用管,如果超过10,则写成:首字母 + 中间的字母数量 + 末尾字母。 代码Python1234567n = int(input())for _ in range(n): word = input() if len(word) > 10: print(word[0] + str...

操作系统基础相关笔记