编写题解 1136: C语言训练-求具有abcd=(ab+cd)2性质的四位数 摘要:解题思路:注意事项:参考代码:for i in range(1000,10000): a = i%100 b = i//100 if (a+b)**2 == i: pr…… 题解列表 2022年06月03日 0 点赞 0 评论 571 浏览 评分:0.0
lf-python _解法 摘要:解题思路:同本人c语言解法一致注意事项:参考代码: sum=100.0 n=int (input()) temp=100.0 for i in range(1,n): …… 题解列表 2022年06月03日 0 点赞 0 评论 610 浏览 评分:0.0
约瑟夫环奥运会开幕式 解题思路:注意事项:之前的想法一直要数的人去动,这个程序反过来想,数数的人站在队头不动就和卖票的一样,数到那个数踢出去就很快剩下的继续转圈圈参考代码:n,m=map(int,input().split())####s=s1=s2=''li=[]foriinrange(1, 题解列表 2022年06月03日 0 点赞 0 评论 514 浏览 评分:0.0
愚蠢的摄影师 摘要:解题思路:只好到规律就很简单了注意事项:无参考代码:n = int(input())results = {1: 1, 2: 1, 3: 2, 4: 4, 5: 6}if n <= 5: prin…… 题解列表 2022年06月03日 0 点赞 0 评论 721 浏览 评分:0.0
换位置——Python直观解法 摘要:解题思路: 假设现在是6个人,就是初始:[1, 2, 3, 4, 5, 6],预期:[1,6, 5, 4, 3, 2],第一个人不动,从初始状态的第二个人开始换位,“2”有两种选择,①向左换位,一直与…… 题解列表 2022年06月02日 0 点赞 0 评论 780 浏览 评分:0.0
输入真的把我难倒了,是我想的太复杂了吗 摘要:解题思路:注意事项:参考代码:##import sys##n=int(input())##li=[]##for i in range(n):## s=input()## li.append…… 题解列表 2022年06月02日 0 点赞 0 评论 542 浏览 评分:0.0
亲密数就是在完数的基础上更进一步 摘要:for i in range(2,3001): s1=s2=1 for j in range(2,i//2+1): if i%j==0: s1+=j …… 题解列表 2022年06月02日 0 点赞 1 评论 729 浏览 评分:8.0
编写题解 1112: C语言考试练习题_一元二次方程 解题思路:注意事项:参考代码:a,b,c=map(int,input().split())deta=(b**2-4*a*c)**(1/2)x1=(-b+deta)/(2*a)x2=(-b-deta)/(2*a)print("%.2f%.2f"%(x1,x2)) 题解列表 2022年06月01日 0 点赞 0 评论 480 浏览 评分:0.0
编写题解 1092: A+B for Input-Output Practice 摘要:解题思路:注意事项:参考代码:n = int(input())for i in range(n): sum = 0 a = list(map(int,input().split())) …… 题解列表 2022年06月01日 0 点赞 0 评论 492 浏览 评分:0.0
好容易忘记我要好好整理一下这些题目这题回文素数 解题思路:注意事项:判断素数又好久没写了,差点忘了,折腾了很久参考代码:frommathimportsqrt##defisp(a,b):a,b=map(int,input().split())foriinrange(a,b+1):forjinrange(2, 题解列表 2022年06月01日 0 点赞 1 评论 505 浏览 评分:9.9