6 篇文章 4 订阅

# A:第几天

import datetime#A:第几天
a=datetime.datetime(2000,1,1)
b=datetime.datetime(2000,5,4)
delta=b-a
print(delta.days+1)#中间差了124天还要加上1.1那天，这种题建议手算一遍验证一下


# B:明码

f=open('./明码.txt')
for i in range(10):
for j in range(0,len(a),2):
b=list(bin(int(a[j]))[2:])
for k in range(len(b)):
if(b[k]=='0'):
print(' ',end='')
else:
print('*',end='')
for j in range(1,len(a)-1,2):
for k in range(len(b)):
if(b[k]=='0'):
print(' ',end='')
else:
print('*',end='')
print()


# C:乘积尾零

python3好像统一长整型不用考虑溢出？话说这种题都不给文本的吗

m=[5650,4542,3554,473,946,4114,3871,9073,90,4329,
2758,7949,6113,5659,5245,7432,3051,4434,6704,3594,
9937,1173,6866,3397,4759,7557,3070,2287,1453,9899,
1486,5722,3135,1170,4014,5510,5120,729,2880,9019,
2049,698,4582,4346,4427,646,9742,7340,1230,7683,
5693,7015,6887,7381,4172,4341,2909,2027,7355,5649,
6701,6645,1671,5978,2704,9926,295,3125,3878,6785,
2066,4247,4800,1578,6652,4616,1113,6205,3264,2915,
3966,5291,2904,1285,2193,1428,2265,8730,9436,7074,
689,5510,8243,6114,337,4096,8199,7313,3685,211]
a=1
for i in range(len(m)):
a*=m[i]
s=0
a=list(str(a))
print(a)
for i in range(len(a)-1,-1,-1):
if(a[i]=='0'):
s+=1
else:
break
print(s)#31


# F:递增三元组

n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
s=0
for i in range(n):
for j in range(n):
for k in range(n):
if(a[i]<b[j]<c[k]):
s+=1
print(s)

• 0
点赞
• 1
收藏
• 打赏
• 0
评论
05-08 6700
07-05 3368
05-01 1446
04-09 3204
06-18 1827
04-10 5216
04-10 2853
11-24 315
04-09 2226
04-09 7933
10-18 2635

### “相关推荐”对你有帮助么？

• 非常没帮助
• 没帮助
• 一般
• 有帮助
• 非常有帮助

Gygert

¥2 ¥4 ¥6 ¥10 ¥20

1.余额是钱包充值的虚拟货币，按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载，可以购买VIP、C币套餐、付费专栏及课程。