
【入门1】顺序结构
dllglvzhenfeng
这个作者很懒,什么都没留下…
展开
-
P1425 小鱼的游泳时间(python3实现)
https://www.luogu.com.cn/problem/P1425"""P1425 小鱼的游泳时间https://www.luogu.com.cn/problem/P1425"""a,b,c,d=list(map(int,input().split()))delta=(60*c+d)-(60*a+b)e=delta//60f=delta%60print(e,end=' ')print(f)原创 2022-01-26 21:48:40 · 1046 阅读 · 1 评论 -
P3954 [NOIP2017 普及组] 成绩(python3实现)
https://www.luogu.com.cn/problem/P3954"""P3954 [NOIP2017 普及组] 成绩https://www.luogu.com.cn/problem/P3954"""a,b,c=list(map(int,input().split()))ans=a*2//10+b*3//10+c*5//10print(ans)原创 2022-01-26 23:50:12 · 289 阅读 · 0 评论 -
P2181 对角线(python3实现)
https://www.luogu.com.cn/problem/P2181"""P2181 对角线https://www.luogu.com.cn/problem/P2181"""n=int(input())ans=n*(n-1)//2*(n-2)//3*(n-3)//4print(ans)原创 2022-01-29 10:59:50 · 492 阅读 · 0 评论 -
P5708 【深基2.习2】三角形面积(python3实现)
【深基2.习2】三角形面积 - 洛谷"""P5708 【深基2.习2】三角形面积https://www.luogu.com.cn/problem/P5708"""import matha,b,c=map(float,input().split())p=(a+b+c)/2ans=math.sqrt(p*(p-a)*(p-b)*(p-c))print("%.1f"%ans)原创 2022-01-30 21:27:28 · 544 阅读 · 0 评论 -
P5706 【深基2.例8】再分肥宅水(python3实现)
https://www.luogu.com.cn/problem/P5706"""P5706 【深基2.例8】再分肥宅水https://www.luogu.com.cn/problem/P5706"""#t=input()#n=int(input())t,n=list(input().split())t=float(t)n=int(n)#print(t)#print(n)ans01=t/nans02=n*2print("%.3f" % ans01)print原创 2022-01-26 20:14:59 · 872 阅读 · 1 评论 -
P5703 【深基2.例5】苹果采购(python3实现)
https://www.luogu.com.cn/problem/P5703"""P5703 【深基2.例5】苹果采购( python3实现 )https://www.luogu.com.cn/problem/P5703"""t,n=map(int,input().split())print(t*n)原创 2022-01-25 18:56:40 · 468 阅读 · 0 评论 -
P5703 【深基2.例5】苹果采购(python3实现)--2022.01.29
https://www.luogu.com.cn/problem/P5703"""P5703 【深基2.例5】苹果采购https://www.luogu.com.cn/problem/P5703"""m,n=map(int,input().split())ans=m*nprint(ans)原创 2022-01-29 16:43:55 · 409 阅读 · 0 评论 -
P5705 【深基2.例7】数字反转(python3实现)方法二
https://www.luogu.com.cn/problem/P5705"""P5705 【深基2.例7】数字反转(python3实现)方法二https://www.luogu.com.cn/problem/P5705"""a=input()p=list(a)#print(p)print(p[4],end='')print(p[3],end='')print(p[2],end='')print(p[1],end='')print(p[0],end='')原创 2022-01-25 19:49:11 · 951 阅读 · 0 评论 -
P5704 【深基2.例6】字母转换(python实现)
https://www.luogu.com.cn/problem/P5704"""P5704 【深基2.例6】字母转换https://www.luogu.com.cn/problem/P5704"""#ch=map(chr,input().split())ch=input()print(ch.upper())原创 2022-01-25 19:06:51 · 513 阅读 · 0 评论 -
P5709 【深基2.习6】Apples Prologue 苹果和虫子(python3实现)
https://www.luogu.com.cn/problem/solution/P5709"""P5709 【深基2.习6】Apples Prologue 苹果和虫子https://www.luogu.com.cn/problem/solution/P5709"""#import sysm,t,s=list( map(int,input().split()))if t==0: print(0) #sys.exit(0)el原创 2022-01-29 11:28:38 · 1016 阅读 · 0 评论 -
P5703 【深基2.例5】苹果采购(scratch实现)
【深基2.例5】苹果采购 - 洛谷scratch2实现scratch3实现python3代码:"""P5703 【深基2.例5】苹果采购https://www.luogu.com.cn/problem/P5703"""m,n=map(int,input().split())ans=m*nprint( ans )C++代码:/*P5703 【深基2.例5】苹果采购https://www.luogu.com.cn/problem...原创 2022-02-12 16:50:14 · 348 阅读 · 0 评论 -
P5707 【深基2.例12】上学迟到(python3实现)
https://www.luogu.com.cn/problem/P5707"""P5707 【深基2.例12】上学迟到https://www.luogu.com.cn/problem/P5707"""import maths,v=map(int,input().split())n=8*60+24*60t=math.ceil(s/v)+10n=n-tif n>=24*60: n-=24*60b=n%60a=n//60if a&原创 2022-01-29 14:56:19 · 498 阅读 · 0 评论 -
P5705 【深基2.例7】数字反转(python3实现)方法一
https://www.luogu.com.cn/problem/P5705"""P5705 【深基2.例7】数字反转(python3实现)方法一https://www.luogu.com.cn/problem/P5705"""p=float(input())q=int(p*10)a=q//1000b=q//100%10c=q//10%10d=q%10print("%d"%d,end='.')print(c,end='')print(b,end='')prin原创 2022-01-25 19:38:11 · 870 阅读 · 0 评论 -
P5704 【深基2.例6】字母转换(python3实现)-2022.01.29
https://www.luogu.com.cn/problem/P5704"""P5704 【深基2.例6】字母转换https://www.luogu.com.cn/problem/P5704"""q=input()Q=q.upper()#print(q.upper())print(Q)原创 2022-01-29 16:57:32 · 269 阅读 · 0 评论 -
P5706 【深基2.例8】再分肥宅水--2022.02.13
【深基2.例8】再分肥宅水 - 洛谷C++代码:/*P5706 【深基2.例8】再分肥宅水--2022.02.13https://www.luogu.com.cn/problem/P5706*/#include <bits/stdc++.h>#include<stdio.h>using namespace std;int main(){ int n,ans02; double t,ans01; cin>>t>>n; a原创 2022-02-13 18:47:25 · 748 阅读 · 0 评论