用简单素数筛选法求N以内的素数。 摘要:n = int(input()) #输入n 值for i in range(2,n+1): #循环 1 ——n for j in range(2,i): #循环 2 —— i …… 题解列表 2023年02月24日 0 点赞 0 评论 471 浏览 评分:0.0
2861: 验证子串(python) 摘要:解题思路:注意事项:参考代码:a = input().strip() # 注意把前导空格去掉 b = input().strip() if a in b: print("%s is s…… 题解列表 2023年02月24日 0 点赞 0 评论 630 浏览 评分:9.9
2858: 整理药名(python) 摘要:解题思路:注意事项:参考代码:n = int(input()) while True: try: s = input() s1 = "" for i in s: …… 题解列表 2023年02月24日 0 点赞 0 评论 619 浏览 评分:9.9
1050: [编程入门]结构体之成绩记录 ```cpp#includeusingnamespacestd;structStudent{stringnum,name;intMath,English,Chinese;};Studentinput(Student);voidprint(Student);intmain(){intN;cin>>N;S 题解列表 2023年02月24日 0 点赞 1 评论 393 浏览 评分:9.9
1049: [编程入门]结构体之时间设计 ```cpp#includeusingnamespacestd;structDate{intyear,mouth,day;};intIsLeapYear(Datedate){if(date.year%4==0&&date.year%100!=0||date.year%400==0){return1;} 题解列表 2023年02月24日 0 点赞 1 评论 1417 浏览 评分:9.9
2857: 加密的病历单(python) 摘要:解题思路:注意事项:参考代码:s = input() s1 = "" for i in s: if (i >= 'x' and i <= 'z') or …… 题解列表 2023年02月23日 0 点赞 0 评论 557 浏览 评分:9.9
【Python题解】蓝桥杯2013年第四届真题-带分数 摘要:解题思路:思路是参照另一位佬,对代码进行了注释和部分修改。从整数->分母->分子,逐个进行判断,具体见代码。参考代码:n = int(input()) # L = ['1', …… 题解列表 2023年02月23日 0 点赞 0 评论 682 浏览 评分:9.9
1007: [编程入门]分段函数求值 摘要:解题思路:注意事项:参考代码: #include<stdio.h>int main(){ int x,y; scanf("%d",&x); if(x<1) { …… 题解列表 2023年02月23日 0 点赞 0 评论 451 浏览 评分:9.9
自守数问题 摘要:解题思路:注意事项:用long型,不然会超出范围参考代码:public class Main { public static void main(String[] args) { …… 题解列表 2023年02月23日 0 点赞 0 评论 528 浏览 评分:0.0