题解列表
最好理解的矩阵转化问题——Python
摘要:参考代码:a,b,c=map(int,input().split())
d,e,f=map(int,input().split())
g,h,i=map(int,input().split())……
简单易于理解的素数问题——Python
摘要:参考代码:a=int(input())
s=0
for i in range(1,a):
if a%i==0:
s=s+1
if s>=2:
print(&……
1866: 三位数反转
摘要:解题思路:切片注意事项:参考代码:while True: try: a = input() print(a[::-1]) except: brea……
计算浮点数相除的余数
摘要:解题思路:注意事项:参考代码:num1,num2 = map(float,input().split())print('%g'%(num1%num2))……
Python方法求根
摘要:参考代码:from math import *
a,b,c=map(int,input().split())
m=b**2-4*a*c
if m>=0:
n=sqrt(m)
……
2911: 连续出现的字符
摘要:解题思路:用 itertools.groupby 来查找字符串中连续出现的字符就好啦注意事项:参考代码:from itertools import groupbyk=int(input())s=inp……
编写题解 2787: 有一门课不及格的学生
摘要:解题思路:两个恰好有一个,联想到异或门,当两变量不同时为一,相同时为零注意事项:参考代码:a,b=map(int,input().strip().split())if (a>=60)^(b>=60)=……
1866: 三位数反转
摘要:解题思路:这题有多行输入,可能会造成错误注意事项:参考代码:while True: try: a = list(input()) b = a[::-1] ……