题解列表
杨辉三角 python
摘要:解题思路:注意事项:参考代码:i,j=map(int,input().split())n=1000a=[[0]*n for i in range(n)]for c in range(n): fo……
1029: [编程入门]自定义函数处理素数
摘要:解题思路:注意事项:参考代码:n = int(input())def myisprime(x): if x < 2: print("not prime") else: ……
第一次,来个简单的。
摘要:#include<stdio.h>
int main()
{
int x,y;
scanf("%d",&x);
if (x<=15)
{
y=2*x;
}
else ……
使用动态规划进行计算k好数
摘要:解题思路:注意事项:参考代码:###使用动态规划进行计算k好数
mod_num=1000000007
K,L=map(int ,input().split())
dp=[[0]*(K+1) fo……
[编程入门]电报加密(简单入门)
摘要:解题思路:注意事项:参考代码:注意事项:字符串需要引号才能通过ord转换为数字形式a=str(input())
res=[]
for i in a:
i=ord(i)#122
……
[编程入门]自定义函数之整数处理(超容易入门)
摘要:解题思路:注意事项:参考代码:第一种方式 :答案错误50冒泡排序ls=list(map(int,input().split()))
for i in range(len(ls)):
for……
编写题解 1046: [编程入门]自定义函数之数字后移(超容易理解)
摘要:解题思路:注意事项:参考代码:刚开始暴力思路:x=list(map(int,input().split()))
h=(x[-2:]+x[:8])
for i in h:
print(i,……
最小公倍数问题6行解决
摘要:解题思路:注意事项:参考代码:a,b,c=map(int,input().split())
n=a*b*c
for i in range(1,n+1):
if i%a==0 and i%……
[编程入门]自定义函数之字符串拷贝
摘要:解题思路:注意事项:参考代码:暴力破解:#切片运算2#暴力m=input()
res=[m[2:]]
for i in res:
print(i,end=" ")第二种优化方式:# 注意……