题解列表

筛选

巧用upper判断

摘要:解题思路:注意事项:参考代码:a=input()b=input()c=a.upper()d=b.upper()if len(a)!=len(b):    print('1')else:……

利用while循环的彻底性

摘要:解题思路:注意事项:参考代码:n=int(input())a=list(map(int,input().split()))while 0 in a:    a.remove(0)for i in a:……

字符串的输出

摘要:解题思路:注意事项:参考代码:n=input()print(len(n))for i in n:    print(i,end=' ')print()print(n[::-1])……

a,b=0时跳出循环

摘要:解题思路:注意事项:参考代码:while True:    a,b=map(int,input().split())    if a==0 and b==0:        break    prin……

列表注意还原为空列表

摘要:解题思路:注意事项:参考代码:while True:    a,b,c=map(int,input().split())    d=[a,b,c]    xx=sorted(d)    if xx[0……

注意换行和列表清空

摘要:解题思路:注意事项:参考代码:while True:    a=list(map(int,input().split()))    a=a[1:]    b=sorted(a,reverse=True……

模拟双指针 (代码简洁)

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include<algorithm>int main(){    int a=0,b=9;/……