python123求解平均值_Python 求解-黑洞

题目

求解字符串数字组合

import itertools

s = input()

n = int(input())

numStr = ''.join(sorted(set(filter(str.isdigit, s)), reverse = True))

for s in itertools.combinations(numStr, n):

print(''.join(list(s)))

求解字符串函数组合

from itertools import combinations

a=input()

b=[]

e=[]

c=set()

d=""

t=0

for i in a:

if i.isdigit():

b.append(eval(i))

for i in b:

c.add(i)

n=eval(input())

if n<=len(c):

for i in combinations(c,n):

i=list(i)

i.sort(reverse=True)

while t

d+=str(i[t])

t+=1

e.append(eval(d))

t=0

d=""

e.sort(reverse=True)

for i in e:

print(i)

黑洞

def isHd(n):

num_str= str(n)

max = ''

min = ''

for i in sorted(num_str,reverse = yes):

max += str(i)

for i in sorted(num_str):

min += str(i)

if int(max) - int(min) == n:

return yes

else:

return no

统计单词数-应用

words = ""

while True:

a = input()

if a == "%%%":

break

a = a.lower()

for i in "!.,:*?#012345689

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值