diff --git a/README.md b/README.md index e0becdd..636e6a5 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +保研岛蓝桥杯Python冲刺班资料库; + 如果您觉得本课程还不错,欢迎点击右上角的 "Star" 给予支持; b站 pre版本视频合集 https://space.bilibili.com/398421867/lists?sid=4898042&spm_id_from=333.788.0.0 @@ -14,4 +16,4 @@ Gitee镜像仓库:https://gitee.com/TsingPig/Lesson_Python_TsingPig.git | https://www.luogu.com.cn/training/list | 洛谷题单 | | https://leetcode.cn/u/endlesscheng/ | 力扣分类题单(进入点击"讨论发布") | | https://www.lanqiao.cn/paper/ | 【★★★★★】蓝桥杯真题卷模拟系统 | -| https://leetcode.cn/problemset/ | 力扣题库 | +| https://leetcode.cn/problemset/ | 力扣题库 | \ No newline at end of file diff --git "a/347円273円203円344円271円240円351円242円230円/____347円273円203円344円271円240円351円242円230円346円261円207円346円200円273円.md" "b/347円273円203円344円271円240円351円242円230円/____347円273円203円344円271円240円351円242円230円346円261円207円346円200円273円.md" index 8ecf911..155caba 100644 --- "a/347円273円203円344円271円240円351円242円230円/____347円273円203円344円271円240円351円242円230円346円261円207円346円200円273円.md" +++ "b/347円273円203円344円271円240円351円242円230円/____347円273円203円344円271円240円351円242円230円346円261円207円346円200円273円.md" @@ -4,48 +4,13 @@ -## 贪心/排序 例题 -https://www.luogu.com.cn/problem/P8218 - -https://leetcode.cn/problems/two-sum/description/?envType=problem-list-v2&envId=o85r8WFa - -https://www.luogu.com.cn/problem/P10387 - - - ## 背包问题 [1.蓝桥课程抢购 - 蓝桥云课 (lanqiao.cn)](https://www.lanqiao.cn/problems/2945/learning/?page=1&first_category_id=1&problem_id=2945) -## 滑动窗口专题补充 -【定长滑窗】https://leetcode.cn/problems/minimum-swaps-to-group-all-1s-together-ii/description/ - -【不定长】https://leetcode.cn/problems/minimum-size-subarray-sum/description/ - -【维护定长滑动窗口和】力扣中等 -https://leetcode.cn/problems/number-of-sub-arrays-of-size-k-and-average-greater-than-or-equal-to-threshold/?envType=featured-list&envId=DMKTNBLj?envType=featured-list&envId=DMKTNBLj - -## 前缀 / 哈希问题 - -【哈希】https://leetcode.cn/problems/two-sum/?envType=problem-list-v2&envId=o85r8WFa -【前缀和模板】https://www.luogu.com.cn/problem/P8218 - -https://leetcode.cn/problems/contiguous-array/description/?envType=problem-list-v2&envId=o85r8WFa - -https://leetcode.cn/problems/number-of-boomerangs/description/?envType=problem-list-v2&envId=o85r8WFa - -【差分、前缀】 - -https://www.lanqiao.cn/problems/3514/learning/ -https://www.lanqiao.cn/problems/19687/learning/ -https://www.lanqiao.cn/problems/19716/learning/ -https://www.lanqiao.cn/problems/17164/learning/ - -## 二分答案习题 -【二分模板】https://www.luogu.com.cn/problem/P2249 -【二分】https://leetcode.cn/problems/count-the-number-of-fair-pairs/description/ +# 二分答案习题 https://leetcode.cn/problems/furthest-building-you-can-reach/ https://leetcode.cn/problems/find-the-median-of-the-uniqueness-array/description/ @@ -54,50 +19,3 @@ https://leetcode.cn/problems/earliest-second-to-mark-indices-i/description/ https://www.lanqiao.cn/problems/99/learning/?page=1&first_category_id=1&second_category_id=3&tags=%E4%BA%8C%E5%88%86,%E7%9C%81%E8%B5%9B&tag_relation=intersection&difficulty=20 - - -## DFS / BFS - -【子集型回溯】https://leetcode.cn/problems/subsets/description/?envType=featured-list&envId=L2JxWeVS?envType=featured-list&envId=L2JxWeVS -【组合型回溯】https://leetcode.cn/problems/combinations/description/?envType=featured-list&envId=L2JxWeVS?envType=featured-list&envId=L2JxWeVS -【排列型回溯】https://leetcode.cn/problems/permutations/description/ -【字符串回溯】https://leetcode.cn/problems/M99OJA/ -【分治】https://leetcode.cn/problems/longest-substring-with-at-least-k-repeating-characters/description/ -【DFS + 字典+连通块问题】https://leetcode.cn/problems/minimum-cost-walk-in-weighted-graph/description/ -【DFS+连通块+素数筛问题】https://leetcode.cn/problems/count-valid-paths-in-a-tree/description/?envType=featured-list&envId=4eH5fI7k?envType=featured-list&envId=4eH5fI7k - -## 并查集补充习题 - -【质因子分解 + 并查集判断连通分量】https://leetcode.cn/problems/gcd-sort-of-an-array/ -【并查集+因数分解】https://leetcode.cn/problems/largest-component-size-by-common-factor/description/?envType=featured-list&envId=GklvgyNg?envType=featured-list&envId=GklvgyNg -【并查集维护连通块】https://leetcode.cn/problems/couples-holding-hands/description/ -【并查集维护所有非质数子连通块的大小】https://leetcode.cn/problems/count-valid-paths-in-a-tree/description/?envType=featured-list&envId=4eH5fI7k?envType=featured-list&envId=4eH5fI7k -【并查集维护连通块按位与的值】https://leetcode.cn/problems/minimum-cost-walk-in-weighted-graph/description/ -【并查集维护链】https://leetcode.cn/problems/subarray-with-elements-greater-than-varying-threshold/description/?envType=featured-list&envId=GklvgyNg?envType=featured-list&envId=GklvgyNg - - - -## 图论补充习题 - -适用于想稳国二,冲国1的同学: -【图论题单】https://leetcode.cn/discuss/post/3581143/fen-xiang-gun-ti-dan-tu-lun-suan-fa-dfsb-qyux/ -【课上例题DFS序】https://leetcode.cn/problems/find-if-path-exists-in-graph/description/ -【课上例题无向图Dijkstra】https://leetcode.cn/problems/network-delay-time/ -【补充Dijstra+DP】https://leetcode.cn/problems/number-of-ways-to-arrive-at-destination/description/?envType=daily-question&envId=2024年03月05日 -【Dijkstra】https://leetcode.cn/problems/minimum-cost-of-a-path-with-special-roads/solutions/?envType=featured-list&envId=QAPjw82k?envType=featured-list&envId=QAPjw82k -【Dijkstra变形】https://leetcode.cn/problems/second-minimum-time-to-reach-destination/description/?envType=featured-list&envId=QAPjw82k?envType=featured-list&envId=QAPjw82k -【Dijkstra变形】https://leetcode.cn/problems/minimum-time-to-visit-a-cell-in-a-grid/?envType=featured-list&envId=QAPjw82k?envType=featured-list&envId=QAPjw82k -【课上例题Floyd】https://leetcode.cn/problems/find-the-k-sum-of-an-array/description/ -【最短路动态修改边权】https://leetcode.cn/problems/modify-graph-edge-weights/description/ - -【蓝桥杯省赛真题:图遍历】https://www.lanqiao.cn/problems/19726/learning/?page=1&first_category_id=1&tags=%E6%9C%80%E7%9F%AD%E8%B7%AF%E9%97%AE%E9%A2%98,%E7%9C%81%E8%B5%9B&tag_relation=intersection -【蓝桥杯省赛真题:最短路DP】https://www.lanqiao.cn/problems/1460/learning/?page=1&first_category_id=1&tags=%E6%9C%80%E7%9F%AD%E8%B7%AF%E9%97%AE%E9%A2%98,%E7%9C%81%E8%B5%9B&tag_relation=intersection -【蓝桥杯省赛真题:图上BFS】https://www.lanqiao.cn/problems/2386/learning/?page=1&first_category_id=1&tags=%E6%9C%80%E7%9F%AD%E8%B7%AF%E9%97%AE%E9%A2%98,%E7%9C%81%E8%B5%9B&tag_relation=intersection -【蓝桥杯国赛真题:Floyd】https://www.lanqiao.cn/problems/2178/learning/?page=1&first_category_id=1&tags=%E6%9C%80%E7%9F%AD%E8%B7%AF%E9%97%AE%E9%A2%98,%E5%9B%BD%E8%B5%9B&tag_relation=intersection - - - -## 数论 - -【数论】cf1700 -https://codeforces.com/contest/1114/problem/C diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2661円 350円257円255円346円263円225円345円237円272円347円241円200円/Python 350円257円276円346円227円2661円.pptx" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2661円 350円257円255円346円263円225円345円237円272円347円241円200円/Python 350円257円276円346円227円2661円.pptx" index 12b85df..4c268c1 100644 Binary files "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2661円 350円257円255円346円263円225円345円237円272円347円241円200円/Python 350円257円276円346円227円2661円.pptx" and "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2661円 350円257円255円346円263円225円345円237円272円347円241円200円/Python 350円257円276円346円227円2661円.pptx" differ diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2661円 350円257円255円346円263円225円345円237円272円347円241円200円/Python351円233円266円345円237円272円347円241円200円347円256円227円346円263円225円344円270円212円346円234円272円350円276円205円345円257円274円351円242円230円347円233円256円344円270円216円345円256円230円346円226円271円351円223円276円346円216円245円357円274円210円347円211円233円345円256円242円347円211円210円357円274円211円.md" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2661円 350円257円255円346円263円225円345円237円272円347円241円200円/Python351円233円266円345円237円272円347円241円200円347円256円227円346円263円225円344円270円212円346円234円272円350円276円205円345円257円274円351円242円230円347円233円256円344円270円216円345円256円230円346円226円271円351円223円276円346円216円245円357円274円210円347円211円233円345円256円242円347円211円210円357円274円211円.md" deleted file mode 100644 index 9305fe4..0000000 --- "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2661円 350円257円255円346円263円225円345円237円272円347円241円200円/Python351円233円266円345円237円272円347円241円200円347円256円227円346円263円225円344円270円212円346円234円272円350円276円205円345円257円274円351円242円230円347円233円256円344円270円216円345円256円230円346円226円271円351円223円276円346円216円245円357円274円210円347円211円233円345円256円242円347円211円210円357円274円211円.md" +++ /dev/null @@ -1,171 +0,0 @@ -# Python零基础算法上机辅导题目与官方链接(牛客版) - -> 面向完全0基础;优先解决上机输入输出、基础语法、循环、字符串、数组,再进入算法入门 - -## 一、官方题单入口 - -1. Python入门到实践四十招:https://www.nowcoder.com/exam/oj/ta?tpId=314 -2. 新手入门130:https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E7%AF%87&topicId=383 -3. 算法入门:https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E5%AD%A6%E4%B9%A0%E7%AF%87&topicId=385 - -## 二、分阶段题目清单 - -### 第0阶段:先学会在 OJ 上提交 -目标:会读入、会输出、知道 Python 提交格式。 -刷题入口:Python入门到实践四十招(https://www.nowcoder.com/exam/oj/ta?tpId=314) - -| 序号 | 题号 | 题目 | 来源题单 | -|---|---|---|---| -| 1 | NP1 | Hello World! | Python40 | -| 2 | NP2 | 多行输出 | Python40 | -| 3 | NP3 | 读入字符串 | Python40 | -| 4 | NP4 | 读入整数数字 | Python40 | -| 5 | NP5 | 格式化输出(一) | Python40 | -| 6 | NP6 | 牛牛的小数输出 | Python40 | -| 7 | noob1 | Hello Nowcoder | Python40 | - -### 第1阶段:Python 基本数据类型 + 运算 -目标:整数、浮点数、字符串、四则运算、整除取余、简单格式处理。 -刷题入口:Python入门到实践四十招(https://www.nowcoder.com/exam/oj/ta?tpId=314) / 新手入门130(https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E7%AF%87&topicId=383) - -| 序号 | 题号 | 题目 | 来源题单 | -|---|---|---|---| -| 8 | noob2 | 牛牛学说话之-整数 | 新手130 | -| 9 | noob3 | 牛牛学说话之-浮点数 | 新手130 | -| 10 | noob4 | 牛牛学说话之-字符串 | 新手130 | -| 11 | noob6 | 牛牛学加法 | 新手130 | -| 12 | noob8 | 计算带余除法 | 新手130 | -| 13 | noob9 | 整数的个位 | 新手130 | -| 14 | noob10 | 整数的十位 | 新手130 | -| 15 | noob11 | 平方根 | 新手130 | -| 16 | noob12 | 反向输出一个四位数 | 新手130 | -| 17 | noob13 | 温标转换 | 新手130 | -| 18 | noob15 | 求四位数各个数位之和 | 新手130 | -| 19 | noob16 | 时间转换 | 新手130 | -| 20 | NP1 | 小数化整数 | Python40 | -| 21 | NP2 | 为整数增加小数点 | Python40 | -| 22 | NP3 | 十六进制数字的大小 | Python40 | - -### 第2阶段:分支判断 -目标:掌握 if / elif / else,学会分类讨论。 -刷题入口:新手入门130(https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E7%AF%87&topicId=383) - -| 序号 | 题号 | 题目 | 来源题单 | -|---|---|---|---| -| 23 | noob21 | 明天星期几? | 新手130 | -| 24 | noob22 | 判断闰年 | 新手130 | -| 25 | noob23 | 比大小 | 新手130 | -| 26 | noob24 | 卡拉兹函数 | 新手130 | -| 27 | noob25 | 牛妹数 | 新手130 | -| 28 | noob26 | 牛牛是否被叫家长 | 新手130 | -| 29 | noob27 | 最大最小值 | 新手130 | -| 30 | noob28 | 四季 | 新手130 | - -### 第3阶段:循环 -目标:掌握 for / while、多组输入、简单枚举与计数。 -刷题入口:新手入门130(https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E7%AF%87&topicId=383) - -| 序号 | 题号 | 题目 | 来源题单 | -|---|---|---|---| -| 31 | noob29 | 多组输入a+b II | 新手130 | -| 32 | noob30 | 多组数据a+b III | 新手130 | -| 33 | noob31 | 素数判断 | 新手130 | -| 34 | noob32 | 牛牛学数列 | 新手130 | -| 35 | noob33 | 牛牛学数列2 | 新手130 | -| 36 | noob34 | 最大的差 | 新手130 | -| 37 | noob35 | 牛牛学数列4 | 新手130 | -| 38 | noob36 | 牛牛学数列5 | 新手130 | -| 39 | noob37 | 数位之和 | 新手130 | -| 40 | noob38 | 牛牛数数 | 新手130 | -| 41 | noob20 | 小乐乐求和 | 新手130 | - -### 第4阶段:列表 / 数组 -目标:会用 Python list 处理一维、二维数据,建立数组思维。 -刷题入口:Python入门到实践四十招(https://www.nowcoder.com/exam/oj/ta?tpId=314) / 新手入门130(https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E7%AF%87&topicId=383) - -| 序号 | 题号 | 题目 | 来源题单 | -|---|---|---|---| -| 42 | NP2 | 生成列表 | Python40 | -| 43 | NP3 | 生成数字列表 | Python40 | -| 44 | NP4 | 列表的长度 | Python40 | -| 45 | noob39 | 牛牛学数列6 | 新手130 | -| 46 | noob41 | 神秘石像的镜像序列 | 新手130 | -| 47 | noob42 | 左侧严格小于计数 | 新手130 | -| 48 | noob44 | 数组计数维护 | 新手130 | -| 49 | noob45 | 记数问题 | 新手130 | -| 50 | noob47 | 校门外的树 | 新手130 | -| 51 | noob48 | 单组_二维数组 | 新手130 | -| 52 | noob49 | 上三角矩阵判定 | 新手130 | -| 53 | noob50 | 矩阵转置 | 新手130 | -| 54 | noob51 | 杨辉三角 | 新手130 | - -### 第5阶段:字符串 -目标:会做切片、遍历、计数、字符处理与格式化输出。 -刷题入口:Python入门到实践四十招(https://www.nowcoder.com/exam/oj/ta?tpId=314) / 新手入门130(https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E7%AF%87&topicId=383) - -| 序号 | 题号 | 题目 | 来源题单 | -|---|---|---|---| -| 55 | NP2 | 单词的长度 | Python40 | -| 56 | NP6 | 截取用户名前10位 | Python40 | -| 57 | noob53 | 年轻人不讲5的 | 新手130 | -| 58 | noob55 | 添加逗号 | 新手130 | -| 59 | noob57 | 凯撒加密 | 新手130 | -| 60 | noob59 | 简写单词 | 新手130 | -| 61 | noob61 | 字符串操作 | 新手130 | -| 62 | NP1 | 牛牛最好的朋友们 | Python40 | -| 63 | NP3 | 格式化输出(二) | Python40 | -| 64 | NP4 | 格式化输出(三) | Python40 | -| 65 | NP5 | 不用循环语句的重复输出 | Python40 | - -### 第6阶段:函数 -目标:开始把代码拆成函数,而不是所有逻辑都写在主程序里。 -刷题入口:新手入门130(https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E7%AF%87&topicId=383) - -| 序号 | 题号 | 题目 | 来源题单 | -|---|---|---|---| -| 66 | noob62 | a 加 b 问题(函数) | 新手130 | -| 67 | noob63 | a 乘 b 问题(函数) | 新手130 | - -### 第7阶段:算法真正入门(完成前面后再刷) -目标:按暴力枚举、模拟、排序、贪心、数论、前缀和、简单动态规划建立算法分类意识。 -刷题入口:算法入门(https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E5%AD%A6%E4%B9%A0%E7%AF%87&topicId=385) - -| 序号 | 题号 | 题目 | 来源题单 | -|---|---|---|---| -| 68 | BGN1 | 小红喜欢1 | 算法入门 | -| 69 | BGN3 | 小红的正整数构造 | 算法入门 | -| 70 | BGN4 | 买橘子 | 算法入门 | -| 71 | BGN11 | 数颜色 | 算法入门 | -| 72 | BGN14 | 计算一年中的第几天 | 算法入门 | -| 73 | BGN20 | 〖模板〗排序 | 算法入门 | -| 74 | BGN21 | 分数线划定 | 算法入门 | -| 75 | BGN26 | 小红背单词 | 算法入门 | -| 76 | BGN29 | 小红的优惠券 | 算法入门 | -| 77 | BGN30 | 讨厌鬼进货 | 算法入门 | -| 78 | BGN41 | 判断质数 | 算法入门 | -| 79 | BGN42 | 分解质因数 | 算法入门 | -| 80 | BGN43 | 最大公因数与最小公倍数 | 算法入门 | -| 81 | BGN51 | 〖模板〗静态区间和(前缀和) | 算法入门 | -| 82 | BGN63 | 数楼梯 | 算法入门 | -| 83 | BGN65 | 小红的地砖 | 算法入门 | -| 84 | BGN68 | 最大子段和 | 算法入门 | - -## 三、不建议过早刷的内容 - -- 树、图、堆、哈希表、复杂递归 / 回溯。 -- 双指针、单调栈、二分答案、中等以上动态规划。 -- 综合机试题。先把输入输出、循环、数组、字符串打稳。 - -## 四、推荐刷题节奏 - -| 时间 | 建议范围 | 本阶段目标 | -|---|---|---| -| 第1周 | 第0〜2阶段 | 会读题、会输入输出、不怕报错。 | -| 第2周 | 第3〜5阶段 | 能独立写循环,能处理列表和字符串。 | -| 第3〜4周 | 第6〜7阶段 | 能区分枚举 / 模拟 / 排序 / 数论 / 前缀和 / DP。 | - -## 五、飞书粘贴版官方链接 - -- Python入门到实践四十招:https://www.nowcoder.com/exam/oj/ta?tpId=314 -- 新手入门130:https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E7%AF%87&topicId=383 -- 算法入门:https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E5%AD%A6%E4%B9%A0%E7%AF%87&topicId=385 \ No newline at end of file diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/1.py" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/1.py" deleted file mode 100644 index f2db9da..0000000 --- "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/1.py" +++ /dev/null @@ -1,2 +0,0 @@ -print(1) -print(2) diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/Python 350円257円276円346円227円26610円.pptx" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/Python 350円257円276円346円227円26610円.pptx" deleted file mode 100644 index d759c3d..0000000 Binary files "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/Python 350円257円276円346円227円26610円.pptx" and /dev/null differ diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/datatime.py" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/datatime.py" deleted file mode 100644 index d8d88ff..0000000 --- "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/datatime.py" +++ /dev/null @@ -1,22 +0,0 @@ -from datetime import * - -# 计算日期之差 -t1 = date(year = 2025, month = 3, day= 1) -t2 = date(year = 2025, month = 3, day = 17) - -print(t2 - t1) # 16 days, 0:00:00 -print((t2 - t1).days) # 16 - -# 参数也可简化 -t1 = date(2025, 1, 1) -t2 = date(2025, 3, 17) -print((t2 - t1).days) # 75 - -# 获取当前日期 -print(date.today()) # 2025年03月17日 - - -t1 = date(2025, 3, 17) -print(t1 + timedelta(days = 2)) # 2025年03月19日 -print(t1 + timedelta(1)) # 2025年03月18日 -print(t1.weekday()) # 0,weekday()从0~6对应星期1~7 diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/343円200円220円347円234円201円350円265円233円347円234円237円351円242円230円343円200円221円347円272円246円346円225円260円344円270円252円346円225円260円.py" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/343円200円220円347円234円201円350円265円233円347円234円237円351円242円230円343円200円221円347円272円246円346円225円260円344円270円252円346円225円260円.py" deleted file mode 100644 index 33a2fd5..0000000 --- "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/343円200円220円347円234円201円350円265円233円347円234円237円351円242円230円343円200円221円347円272円246円346円225円260円344円270円252円346円225円260円.py" +++ /dev/null @@ -1,10 +0,0 @@ -from math import * -def solve(x): - res = [] - for i in range(2, int(sqrt(x)) + 1): - if x % i == 0: - res.append(i) - if i != x // i: - res.append(x // i) - return len(res) + 2 -print(solve(1200000)) diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/343円200円220円347円234円201円350円265円233円347円234円237円351円242円230円343円200円221円350円264円250円345円233円240円346円225円260円344円270円252円346円225円260円.py" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/343円200円220円347円234円201円350円265円233円347円234円237円351円242円230円343円200円221円350円264円250円345円233円240円346円225円260円344円270円252円346円225円260円.py" deleted file mode 100644 index 2f3509d..0000000 --- "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/343円200円220円347円234円201円350円265円233円347円234円237円351円242円230円343円200円221円350円264円250円345円233円240円346円225円260円344円270円252円346円225円260円.py" +++ /dev/null @@ -1,14 +0,0 @@ -from math import * -# 统计质因子及其出现次数 -def breakdown(x): - res = [] - for i in range(2, int(sqrt(x)) + 1): - if x % i == 0: - cnt = 0 - while x % i == 0: - x //= i - cnt += 1 - res.append((i, cnt)) - if x> 1: res.append((x, 1)) - return res -print(len(breakdown(int(input())))) diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/343円200円220円350円223円235円346円241円245円346円235円257円347円234円237円351円242円230円343円200円221円346円230円237円346円234円237円344円270円200円.py" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/343円200円220円350円223円235円346円241円245円346円235円257円347円234円237円351円242円230円343円200円221円346円230円237円346円234円237円344円270円200円.py" deleted file mode 100644 index 364bb2f..0000000 --- "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/343円200円220円350円223円235円346円241円245円346円235円257円347円234円237円351円242円230円343円200円221円346円230円237円346円234円237円344円270円200円.py" +++ /dev/null @@ -1,10 +0,0 @@ -from datetime import * -t1 = date(1901, 1, 1) -t2 = date(2000, 12, 31) - -res = 0 -while t1 <= t2: - if t1.weekday() == 0: - res += 1 - t1 += timedelta(days = 1) -print(res) diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/345円210円206円350円247円243円350円264円250円345円233円240円345円255円220円.py" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/345円210円206円350円247円243円350円264円250円345円233円240円345円255円220円.py" deleted file mode 100644 index 5aa89e7..0000000 --- "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/345円210円206円350円247円243円350円264円250円345円233円240円345円255円220円.py" +++ /dev/null @@ -1,14 +0,0 @@ -from math import * -def solve(x): - for i in range(2, int(sqrt(x)) + 1): # i = 2; i * i <= x - if x % i == 0: - s = 0 - while x % i == 0: - s += 1 - x //= i - print(f'{i} {s}') # i 是质因子, s 表示幂次 - if x> 1: - print(f'{x} 1') - print() - -solve(2 ** 3 * 3 ** 4 * 5 ** 2 * 7 * 14) diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/345円210円206円350円247円243円350円264円250円345円233円240円345円255円2202円357円274円232円350円277円224円345円233円236円345円210円227円350円241円250円345円206円231円346円263円225円.py" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/345円210円206円350円247円243円350円264円250円345円233円240円345円255円2202円357円274円232円350円277円224円345円233円236円345円210円227円350円241円250円345円206円231円346円263円225円.py" deleted file mode 100644 index 34de804..0000000 --- "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/345円210円206円350円247円243円350円264円250円345円233円240円345円255円2202円357円274円232円350円277円224円345円233円236円345円210円227円350円241円250円345円206円231円346円263円225円.py" +++ /dev/null @@ -1,14 +0,0 @@ -from math import * -# 统计质因子及其出现次数 -def breakdown(x): - res = [] - for i in range(2, int(sqrt(x)) + 1): - if x % i == 0: - cnt = 0 - while x % i == 0: - x //= i - cnt += 1 - res.append((i, cnt)) - if x> 1: res.append((x, 1)) - return res -print(breakdown(2 ** 3 * 3 ** 4 * 5 ** 2 * 7 * 14)) # [(2, 4), (3, 4), (5, 2), (7, 2)] diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/345円220円2532円345円244円251円346円225円260円.py" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/345円220円2532円345円244円251円346円225円260円.py" deleted file mode 100644 index 3411281..0000000 --- "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/345円220円2532円345円244円251円346円225円260円.py" +++ /dev/null @@ -1,11 +0,0 @@ -from datetime import * - -t1 = date(1900, 1, 1) -t2 = date(9999, 12, 31) -delta = timedelta(1) -res = 0 -while t1 < t2: - if '2' in ''.join([str(t1.year), str(t1.month), str(t1.day)]): res += 1 - t1 += delta -print(res + 1) # 1994240 - diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/345円257円273円346円211円276円347円272円246円346円225円260円.py" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/345円257円273円346円211円276円347円272円246円346円225円260円.py" deleted file mode 100644 index 1573f8a..0000000 --- "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円26610円 346円225円260円350円256円272円345円237円272円347円241円200円 & 346円227円245円346円234円237円351円227円256円351円242円230円/345円257円273円346円211円276円347円272円246円346円225円260円.py" +++ /dev/null @@ -1,10 +0,0 @@ -from math import * -def solve(x): - res = [] - for i in range(2, int(sqrt(x)) + 1): - if x % i == 0: - res.append(i) - if i != x // i: - res.append(x // i) - return res -print(solve(24)) # [2, 12, 3, 8, 4, 6] diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2662円 347円256円227円346円263円225円345円205円245円351円227円250円/Python 350円257円276円346円227円2662円.pptx" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2662円 347円256円227円346円263円225円345円205円245円351円227円250円/Python 350円257円276円346円227円2662円.pptx" index b2055b1..bbe2302 100644 Binary files "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2662円 347円256円227円346円263円225円345円205円245円351円227円250円/Python 350円257円276円346円227円2662円.pptx" and "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2662円 347円256円227円346円263円225円345円205円245円351円227円250円/Python 350円257円276円346円227円2662円.pptx" differ diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2663円 350円264円252円345円277円203円 & 346円216円222円345円272円217円/Python 350円257円276円346円227円2663円.pptx" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2663円 350円264円252円345円277円203円 & 346円216円222円345円272円217円/Python 350円257円276円346円227円2663円.pptx" index 07aab4f..2ddd595 100644 Binary files "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2663円 350円264円252円345円277円203円 & 346円216円222円345円272円217円/Python 350円257円276円346円227円2663円.pptx" and "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2663円 350円264円252円345円277円203円 & 346円216円222円345円272円217円/Python 350円257円276円346円227円2663円.pptx" differ diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2664円 346円232円264円345円212円233円 & 345円223円210円345円270円214円 & 345円211円215円347円274円200円345円222円214円/4.py" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2664円 346円232円264円345円212円233円 & 345円223円210円345円270円214円 & 345円211円215円347円274円200円345円222円214円/4.py" deleted file mode 100644 index 3f4f6a4..0000000 --- "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2664円 346円232円264円345円212円233円 & 345円223円210円345円270円214円 & 345円211円215円347円274円200円345円222円214円/4.py" +++ /dev/null @@ -1,5 +0,0 @@ - -import sys -input = lambda: sys.stdin.readline().strip() - -nums = list(map(int, input().split())) diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2664円 346円232円264円345円212円233円 & 345円223円210円345円270円214円 & 345円211円215円347円274円200円345円222円214円/Python 350円257円276円346円227円2664円 .pptx" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2664円 346円232円264円345円212円233円 & 345円223円210円345円270円214円 & 345円211円215円347円274円200円345円222円214円/Python 350円257円276円346円227円2664円 .pptx" index 2c3361c..76d74da 100644 Binary files "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2664円 346円232円264円345円212円233円 & 345円223円210円345円270円214円 & 345円211円215円347円274円200円345円222円214円/Python 350円257円276円346円227円2664円 .pptx" and "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2664円 346円232円264円345円212円233円 & 345円223円210円345円270円214円 & 345円211円215円347円274円200円345円222円214円/Python 350円257円276円346円227円2664円 .pptx" differ diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2664円 346円232円264円345円212円233円 & 345円223円210円345円270円214円 & 345円211円215円347円274円200円345円222円214円/Python351円233円266円345円237円272円347円241円200円347円256円227円346円263円225円344円270円212円346円234円272円350円276円205円345円257円274円351円242円230円347円233円256円344円270円216円345円256円230円346円226円271円351円223円276円346円216円245円357円274円210円347円211円233円345円256円242円347円211円210円357円274円211円.md" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2664円 346円232円264円345円212円233円 & 345円223円210円345円270円214円 & 345円211円215円347円274円200円345円222円214円/Python351円233円266円345円237円272円347円241円200円347円256円227円346円263円225円344円270円212円346円234円272円350円276円205円345円257円274円351円242円230円347円233円256円344円270円216円345円256円230円346円226円271円351円223円276円346円216円245円357円274円210円347円211円233円345円256円242円347円211円210円357円274円211円.md" deleted file mode 100644 index 9305fe4..0000000 --- "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2664円 346円232円264円345円212円233円 & 345円223円210円345円270円214円 & 345円211円215円347円274円200円345円222円214円/Python351円233円266円345円237円272円347円241円200円347円256円227円346円263円225円344円270円212円346円234円272円350円276円205円345円257円274円351円242円230円347円233円256円344円270円216円345円256円230円346円226円271円351円223円276円346円216円245円357円274円210円347円211円233円345円256円242円347円211円210円357円274円211円.md" +++ /dev/null @@ -1,171 +0,0 @@ -# Python零基础算法上机辅导题目与官方链接(牛客版) - -> 面向完全0基础;优先解决上机输入输出、基础语法、循环、字符串、数组,再进入算法入门 - -## 一、官方题单入口 - -1. Python入门到实践四十招:https://www.nowcoder.com/exam/oj/ta?tpId=314 -2. 新手入门130:https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E7%AF%87&topicId=383 -3. 算法入门:https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E5%AD%A6%E4%B9%A0%E7%AF%87&topicId=385 - -## 二、分阶段题目清单 - -### 第0阶段:先学会在 OJ 上提交 -目标:会读入、会输出、知道 Python 提交格式。 -刷题入口:Python入门到实践四十招(https://www.nowcoder.com/exam/oj/ta?tpId=314) - -| 序号 | 题号 | 题目 | 来源题单 | -|---|---|---|---| -| 1 | NP1 | Hello World! | Python40 | -| 2 | NP2 | 多行输出 | Python40 | -| 3 | NP3 | 读入字符串 | Python40 | -| 4 | NP4 | 读入整数数字 | Python40 | -| 5 | NP5 | 格式化输出(一) | Python40 | -| 6 | NP6 | 牛牛的小数输出 | Python40 | -| 7 | noob1 | Hello Nowcoder | Python40 | - -### 第1阶段:Python 基本数据类型 + 运算 -目标:整数、浮点数、字符串、四则运算、整除取余、简单格式处理。 -刷题入口:Python入门到实践四十招(https://www.nowcoder.com/exam/oj/ta?tpId=314) / 新手入门130(https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E7%AF%87&topicId=383) - -| 序号 | 题号 | 题目 | 来源题单 | -|---|---|---|---| -| 8 | noob2 | 牛牛学说话之-整数 | 新手130 | -| 9 | noob3 | 牛牛学说话之-浮点数 | 新手130 | -| 10 | noob4 | 牛牛学说话之-字符串 | 新手130 | -| 11 | noob6 | 牛牛学加法 | 新手130 | -| 12 | noob8 | 计算带余除法 | 新手130 | -| 13 | noob9 | 整数的个位 | 新手130 | -| 14 | noob10 | 整数的十位 | 新手130 | -| 15 | noob11 | 平方根 | 新手130 | -| 16 | noob12 | 反向输出一个四位数 | 新手130 | -| 17 | noob13 | 温标转换 | 新手130 | -| 18 | noob15 | 求四位数各个数位之和 | 新手130 | -| 19 | noob16 | 时间转换 | 新手130 | -| 20 | NP1 | 小数化整数 | Python40 | -| 21 | NP2 | 为整数增加小数点 | Python40 | -| 22 | NP3 | 十六进制数字的大小 | Python40 | - -### 第2阶段:分支判断 -目标:掌握 if / elif / else,学会分类讨论。 -刷题入口:新手入门130(https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E7%AF%87&topicId=383) - -| 序号 | 题号 | 题目 | 来源题单 | -|---|---|---|---| -| 23 | noob21 | 明天星期几? | 新手130 | -| 24 | noob22 | 判断闰年 | 新手130 | -| 25 | noob23 | 比大小 | 新手130 | -| 26 | noob24 | 卡拉兹函数 | 新手130 | -| 27 | noob25 | 牛妹数 | 新手130 | -| 28 | noob26 | 牛牛是否被叫家长 | 新手130 | -| 29 | noob27 | 最大最小值 | 新手130 | -| 30 | noob28 | 四季 | 新手130 | - -### 第3阶段:循环 -目标:掌握 for / while、多组输入、简单枚举与计数。 -刷题入口:新手入门130(https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E7%AF%87&topicId=383) - -| 序号 | 题号 | 题目 | 来源题单 | -|---|---|---|---| -| 31 | noob29 | 多组输入a+b II | 新手130 | -| 32 | noob30 | 多组数据a+b III | 新手130 | -| 33 | noob31 | 素数判断 | 新手130 | -| 34 | noob32 | 牛牛学数列 | 新手130 | -| 35 | noob33 | 牛牛学数列2 | 新手130 | -| 36 | noob34 | 最大的差 | 新手130 | -| 37 | noob35 | 牛牛学数列4 | 新手130 | -| 38 | noob36 | 牛牛学数列5 | 新手130 | -| 39 | noob37 | 数位之和 | 新手130 | -| 40 | noob38 | 牛牛数数 | 新手130 | -| 41 | noob20 | 小乐乐求和 | 新手130 | - -### 第4阶段:列表 / 数组 -目标:会用 Python list 处理一维、二维数据,建立数组思维。 -刷题入口:Python入门到实践四十招(https://www.nowcoder.com/exam/oj/ta?tpId=314) / 新手入门130(https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E7%AF%87&topicId=383) - -| 序号 | 题号 | 题目 | 来源题单 | -|---|---|---|---| -| 42 | NP2 | 生成列表 | Python40 | -| 43 | NP3 | 生成数字列表 | Python40 | -| 44 | NP4 | 列表的长度 | Python40 | -| 45 | noob39 | 牛牛学数列6 | 新手130 | -| 46 | noob41 | 神秘石像的镜像序列 | 新手130 | -| 47 | noob42 | 左侧严格小于计数 | 新手130 | -| 48 | noob44 | 数组计数维护 | 新手130 | -| 49 | noob45 | 记数问题 | 新手130 | -| 50 | noob47 | 校门外的树 | 新手130 | -| 51 | noob48 | 单组_二维数组 | 新手130 | -| 52 | noob49 | 上三角矩阵判定 | 新手130 | -| 53 | noob50 | 矩阵转置 | 新手130 | -| 54 | noob51 | 杨辉三角 | 新手130 | - -### 第5阶段:字符串 -目标:会做切片、遍历、计数、字符处理与格式化输出。 -刷题入口:Python入门到实践四十招(https://www.nowcoder.com/exam/oj/ta?tpId=314) / 新手入门130(https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E7%AF%87&topicId=383) - -| 序号 | 题号 | 题目 | 来源题单 | -|---|---|---|---| -| 55 | NP2 | 单词的长度 | Python40 | -| 56 | NP6 | 截取用户名前10位 | Python40 | -| 57 | noob53 | 年轻人不讲5的 | 新手130 | -| 58 | noob55 | 添加逗号 | 新手130 | -| 59 | noob57 | 凯撒加密 | 新手130 | -| 60 | noob59 | 简写单词 | 新手130 | -| 61 | noob61 | 字符串操作 | 新手130 | -| 62 | NP1 | 牛牛最好的朋友们 | Python40 | -| 63 | NP3 | 格式化输出(二) | Python40 | -| 64 | NP4 | 格式化输出(三) | Python40 | -| 65 | NP5 | 不用循环语句的重复输出 | Python40 | - -### 第6阶段:函数 -目标:开始把代码拆成函数,而不是所有逻辑都写在主程序里。 -刷题入口:新手入门130(https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E7%AF%87&topicId=383) - -| 序号 | 题号 | 题目 | 来源题单 | -|---|---|---|---| -| 66 | noob62 | a 加 b 问题(函数) | 新手130 | -| 67 | noob63 | a 乘 b 问题(函数) | 新手130 | - -### 第7阶段:算法真正入门(完成前面后再刷) -目标:按暴力枚举、模拟、排序、贪心、数论、前缀和、简单动态规划建立算法分类意识。 -刷题入口:算法入门(https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E5%AD%A6%E4%B9%A0%E7%AF%87&topicId=385) - -| 序号 | 题号 | 题目 | 来源题单 | -|---|---|---|---| -| 68 | BGN1 | 小红喜欢1 | 算法入门 | -| 69 | BGN3 | 小红的正整数构造 | 算法入门 | -| 70 | BGN4 | 买橘子 | 算法入门 | -| 71 | BGN11 | 数颜色 | 算法入门 | -| 72 | BGN14 | 计算一年中的第几天 | 算法入门 | -| 73 | BGN20 | 〖模板〗排序 | 算法入门 | -| 74 | BGN21 | 分数线划定 | 算法入门 | -| 75 | BGN26 | 小红背单词 | 算法入门 | -| 76 | BGN29 | 小红的优惠券 | 算法入门 | -| 77 | BGN30 | 讨厌鬼进货 | 算法入门 | -| 78 | BGN41 | 判断质数 | 算法入门 | -| 79 | BGN42 | 分解质因数 | 算法入门 | -| 80 | BGN43 | 最大公因数与最小公倍数 | 算法入门 | -| 81 | BGN51 | 〖模板〗静态区间和(前缀和) | 算法入门 | -| 82 | BGN63 | 数楼梯 | 算法入门 | -| 83 | BGN65 | 小红的地砖 | 算法入门 | -| 84 | BGN68 | 最大子段和 | 算法入门 | - -## 三、不建议过早刷的内容 - -- 树、图、堆、哈希表、复杂递归 / 回溯。 -- 双指针、单调栈、二分答案、中等以上动态规划。 -- 综合机试题。先把输入输出、循环、数组、字符串打稳。 - -## 四、推荐刷题节奏 - -| 时间 | 建议范围 | 本阶段目标 | -|---|---|---| -| 第1周 | 第0〜2阶段 | 会读题、会输入输出、不怕报错。 | -| 第2周 | 第3〜5阶段 | 能独立写循环,能处理列表和字符串。 | -| 第3〜4周 | 第6〜7阶段 | 能区分枚举 / 模拟 / 排序 / 数论 / 前缀和 / DP。 | - -## 五、飞书粘贴版官方链接 - -- Python入门到实践四十招:https://www.nowcoder.com/exam/oj/ta?tpId=314 -- 新手入门130:https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E7%AF%87&topicId=383 -- 算法入门:https://www.nowcoder.com/exam/oj?page=1&tab=%E7%AE%97%E6%B3%95%E5%AD%A6%E4%B9%A0%E7%AF%87&topicId=385 \ No newline at end of file diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2665円 344円272円214円345円210円206円346円237円245円346円211円276円 & 344円272円214円345円210円206円347円255円224円346円241円210円/Python 350円257円276円346円227円2665円.pptx" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2665円 344円272円214円345円210円206円346円237円245円346円211円276円 & 344円272円214円345円210円206円347円255円224円346円241円210円/Python 350円257円276円346円227円2665円.pptx" index 36a888b..41938e2 100644 Binary files "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2665円 344円272円214円345円210円206円346円237円245円346円211円276円 & 344円272円214円345円210円206円347円255円224円346円241円210円/Python 350円257円276円346円227円2665円.pptx" and "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2665円 344円272円214円345円210円206円346円237円245円346円211円276円 & 344円272円214円345円210円206円347円255円224円346円241円210円/Python 350円257円276円346円227円2665円.pptx" differ diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2666円 346円220円234円347円264円242円 & BFS & DFS/Python 350円257円276円346円227円2666円.pptx" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2666円 346円220円234円347円264円242円 & BFS & DFS/Python 350円257円276円346円227円2666円.pptx" index 6274c7f..797a0f0 100644 Binary files "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2666円 346円220円234円347円264円242円 & BFS & DFS/Python 350円257円276円346円227円2666円.pptx" and "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2666円 346円220円234円347円264円242円 & BFS & DFS/Python 350円257円276円346円227円2666円.pptx" differ diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2668円 345円212円250円346円200円201円350円247円204円345円210円222円/Python 350円257円276円346円227円2668円.pptx" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2668円 345円212円250円346円200円201円350円247円204円345円210円222円/Python 350円257円276円346円227円2668円.pptx" index 8829a29..28676ed 100644 Binary files "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2668円 345円212円250円346円200円201円350円247円204円345円210円222円/Python 350円257円276円346円227円2668円.pptx" and "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2668円 345円212円250円346円200円201円350円247円204円345円210円222円/Python 350円257円276円346円227円2668円.pptx" differ diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2669円 345円233円276円350円256円272円/DFS351円201円215円345円216円206円346円227円240円345円220円221円345円233円276円.py" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2669円 345円233円276円350円256円272円/DFS351円201円215円345円216円206円346円227円240円345円220円221円345円233円276円.py" deleted file mode 100644 index a043352..0000000 --- "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2669円 345円233円276円350円256円272円/DFS351円201円215円345円216円206円346円227円240円345円220円221円345円233円276円.py" +++ /dev/null @@ -1,17 +0,0 @@ -n, m = map(int, input().split()) -e = [[] for _ in range(n)] -for _ in range(m): - u, v, w = map(int, input().split()) - e[u].append((v, w)) - e[v].append((u, w)) - -s = set() # 已经访问的 -def dfs(u): - for v, _ in e[u]: - if v not in s: - dfs(v) - -dfs(0) # 0 1 2 3 4 -print() -s.clear() #已经访问的 -dfs(4) # 4 3 0 1 2 diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2669円 345円233円276円350円256円272円/Python 350円257円276円346円227円2669円.pptx" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2669円 345円233円276円350円256円272円/Python 350円257円276円346円227円2669円.pptx" deleted file mode 100644 index 4288bfd..0000000 Binary files "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2669円 345円233円276円350円256円272円/Python 350円257円276円346円227円2669円.pptx" and /dev/null differ diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2669円 345円233円276円350円256円272円/343円200円220円Dijkstra343円200円221円346円250円241円346円235円277円.py" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2669円 345円233円276円350円256円272円/343円200円220円Dijkstra343円200円221円346円250円241円346円235円277円.py" deleted file mode 100644 index efca27f..0000000 --- "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2669円 345円233円276円350円256円272円/343円200円220円Dijkstra343円200円221円346円250円241円346円235円277円.py" +++ /dev/null @@ -1,27 +0,0 @@ -from math import inf -n, m = map(int, input().split()) -g = [[inf] * n for _ in range(n)] -for _ in range(m): - u, v, w = map(int, input().split()) - g[u][v] = g[v][u] = w - g[u][u] = g[v][v] = 0 - - -d = [inf] * n -d[4] = 0 -s = set() # S集合为已经确定的节点集合 - - -for _ in range(n - 1): - x = -1 - # 从 U - S中找出距离S最近的节点 - for u in range(n): - if u not in s and (x < 0 or d[u] < d[x]): - x = u - s.add(x) - - # 松弛,对每个节点判断以x作为中间节点时,是否距离原点更加 - for u in range(n): - d[u] = min(d[u], d[x] + g[u][x]) - -print(d) # [10, 11, 16, 7, 0] diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2669円 345円233円276円350円256円272円/343円200円220円Floyd343円200円221円346円250円241円346円235円277円.py" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2669円 345円233円276円350円256円272円/343円200円220円Floyd343円200円221円346円250円241円346円235円277円.py" deleted file mode 100644 index dfa4d1a..0000000 --- "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2669円 345円233円276円350円256円272円/343円200円220円Floyd343円200円221円346円250円241円346円235円277円.py" +++ /dev/null @@ -1,15 +0,0 @@ -from math import inf -n, m = map(int, input().split()) -g = [[inf] * n for _ in range(n)] -for _ in range(m): - u, v, w = map(int, input().split()) - g[u][v] = g[v][u] = w - g[u][u] = g[v][v] = 0 - -for k in range(n): - for u in range(n): - for v in range(n): - g[u][v] = min(g[u][v], g[u][k] + g[k][v]) - -print(g) -print(g[4][2]) # 16 diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2669円 345円233円276円350円256円272円/343円200円220円351円202円273円346円216円245円347円237円251円351円230円265円343円200円221円345円270円246円346円235円203円346円227円240円345円220円221円345円233円276円.py" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2669円 345円233円276円350円256円272円/343円200円220円351円202円273円346円216円245円347円237円251円351円230円265円343円200円221円345円270円246円346円235円203円346円227円240円345円220円221円345円233円276円.py" deleted file mode 100644 index 1bfc53c..0000000 --- "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2669円 345円233円276円350円256円272円/343円200円220円351円202円273円346円216円245円347円237円251円351円230円265円343円200円221円345円270円246円346円235円203円346円227円240円345円220円221円345円233円276円.py" +++ /dev/null @@ -1,7 +0,0 @@ -from math import inf -n, m = map(int, input().split()) -g = [[inf] * n for _ in range(n)] -for _ in range(m): - u, v, w = map(int, input().split()) - g[u][v] = g[v][u] = w - g[u][u] = g[v][v] = 0 # 原地不动,距离是0 diff --git "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2669円 345円233円276円350円256円272円/343円200円220円351円202円273円346円216円245円350円241円250円343円200円221円345円270円246円346円235円203円346円227円240円345円220円221円345円233円276円.py" "b/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2669円 345円233円276円350円256円272円/343円200円220円351円202円273円346円216円245円350円241円250円343円200円221円345円270円246円346円235円203円346円227円240円345円220円221円345円233円276円.py" deleted file mode 100644 index 8cdddf7..0000000 --- "a/350円223円235円346円241円245円346円235円257円Python345円206円262円345円210円272円350円257円276円_350円257円276円346円227円2669円 345円233円276円350円256円272円/343円200円220円351円202円273円346円216円245円350円241円250円343円200円221円345円270円246円346円235円203円346円227円240円345円220円221円345円233円276円.py" +++ /dev/null @@ -1,9 +0,0 @@ -n, m = map(int, input().split()) -e = [[] for _ in range(n)] -for _ in range(m): - u, v, w = map(int, input().split()) - e[u].append((v, w)) - e[v].append((u, w)) - -for row in e: - print(row)

AltStyle によって変換されたページ (->オリジナル) /