当前位置:网站首页>PAT Level B - B1021 Single Digit Statistics (15)
PAT Level B - B1021 Single Digit Statistics (15)
2022-08-05 09:13:00 【nekoha_dexter】
Given a k-bit integer N=dk−110k−1+⋯+d1101+d0 (0≤di≤9, i=0,⋯,k−1, dk−1>0), please write a program to count the number of occurrences of each different single digit.Example: Given N=100311, there are 2 0s, 3 1s, and 1 3.
input format:
Each input contains 1 test case, a positive integer N of no more than 1000 digits.
Output format:
For each different one-digit digit in N, output the digit D and its occurrence in N on one line in the format D:MTimes M.Requires output in ascending order of D.
Input sample:
100311Example output:
0:21:33:1#include#include 边栏推荐
猜你喜欢
随机推荐
Controller-----controller
【ASM】字节码操作 方法的初始化 Frame
明天去订票,准备回家咯~~
2022/8/4 考试总结
Creo 9.0 基准特征:基准轴
seata源码解析:事务状态及全局锁的存储
k-nearest neighbor fault monitoring based on multi-block information extraction and Mahalanobis distance
MQTT X Newsletter 2022-07 | 自动更新、MQTT X CLI 支持 MQTT 5.0、新增 conn 命令…
为什么我推荐使用智能化async?
工程制图知识点
手机上流行的各类谜语
程序员的七种武器
love is a sad song
Linux导出数据库数据到硬盘
Thinking and summary of the efficiency of IT R&D/development process specification
Luogu P1966: [NOIP2013 提高组] 火柴排队 [树状数组+逆序对]
十一道家常小菜详细攻略[图文并茂]
网页直接访问链接不让安全中心拦截
leetcode refers to Offer 10- II. Frog jumping steps
链表中的数字相加----链表专题









