题解列表

筛选

1280: 找啊找啊找GF

摘要:解题思路 01背包的思路,先找到可以泡最多妹子的数量,然后再在最多妹子数量中找到时间最少得注意事项:参考代码:#include<bits/stdc++.h> using namespace std;……

入门编程题成绩评定

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int X;    scanf("%d",&X);    if(X <=100)    {      if……

统计字母个数

摘要:解题思路:注意事项:参考代码:L = list(input())while &#39;#&#39;not in L:    L.extend(input())for i in range(ord(&#……

超级楼梯——递归

摘要:解题思路:注意事项:参考代码:def pa(n):    if n == 1 or n == 2:        return n    else:        return pa(n-1)+pa(……

绝对值排序---抽象JAVA

解题思路:TreeSet去重,排序Comparator绝对值排序注意事项:无参考代码:importjava.util.*;publicclassMain{publicstaticvoidmain(String[]args){Scannersc=newScanner(System.in);TreeSet

字符串问题——抽象JAVA

解题思路:StringBuilder反转参考代码:importjava.util.*;publicclassMain{publicstaticvoidmain(String[]args){Scannerscanner=newScanner(System.in);Stringstring=scanner

阶乘末尾的K位

解题思路:注意事项:参考代码:frommathimport*n,k=map(int,input().split())a=str(factorial(n))whilea.endswith('0'):a=a[:len(a)-1]print(a[-k:])

小明A+B---抽象JAVA

解题思路:字符串截取注意事项:参考代码:importjava.util.*;publicclassMain{publicstaticvoidmain(String[]args){Scannersc=newScanner(System.in);intn=sc.nextInt();for(inti=0;i

最大配对——python

解题思路:注意事项:参考代码:n=int(input())L1=list(map(int,input().split()))L2=list(map(int,input().split()))L1.sort()L2=sorted(L2)[::-1]print(sum(abs(L1[i]-L2[i])fo