light


私信TA

用户名:xuxiao010101

访问量:1493

签 名:

等  级
排  名 6005
经  验 1415
参赛次数 0
文章发表 9
年  龄 0
在职情况 学生
学  校 NEAU
专  业 计算机类

  自我简介:

解题思路:学习python第一天

注意事项: python的在线编译器用不了

参考代码:

# 字符串的统计 str.count('字符串') 输出为int类型的个数

str=input()

a0=str.count('0')

a1=str.count('1')

a2=str.count('2')

a3=str.count('3')

a4=str.count('4')

a5=str.count('5')

a6=str.count('6')

a7=str.count('7')

a8=str.count('8')

a9=str.count('9')

print(a0+a1+a2+a3+a4+a5+a6+a7+a8+a9)


 

0.0分

3 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区

?
?
?
?
?
?
??
?
?
2024-03-02 17:52:13
  • «
  • 1
  • »