当前位置:网站首页>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:M
Times M
.Requires output in ascending order of D
.
Input sample:
100311
Example output:
0:21:33:1
#include#include
边栏推荐
猜你喜欢
Comprehensively explain what is the essential difference between GET and POST requests?Turns out I always misunderstood
Concurrent CAS
使用稀疏 4D 卷积对 3D LiDAR 数据中的运动对象进行后退分割(IROS 2022)
基于 Kubernetes 的微服务项目整体设计与实现
There is only one switch, how to realize the nqa of master-slave automatic switching
Creo 9.0 基准特征:基准坐标系
express hot-reload
科普大佬说 | 港大黄凯斌老师带你解锁黑客帝国与6G的关系
【ASM】字节码操作 方法的初始化 Frame
DTcloud 装饰器
随机推荐
Concurrent CAS
2022/8/4 考试总结
只有一台交换机,如何实现主从自动切换之nqa
明天去订票,准备回家咯~~
Luogu P1908: 逆序对 [树状数组]
汇编语言(8)x86内联汇编
ts/js function pass parameter with function writing
2022-08-01 回顾基础二叉树以及操作
Comprehensively explain what is the essential difference between GET and POST requests?Turns out I always misunderstood
深度学习21天——卷积神经网络(CNN):服装图像分类(第3天)
深度学习21天——卷积神经网络(CNN):天气识别(第5天)
15.1.1、md—md的基础语法,快速的写文本备忘录
动态库之间回调函数使用
Hbuilder 学习使用中的一些记录
k-nearest neighbor fault monitoring based on multi-block information extraction and Mahalanobis distance
express hot-reload
The Coolest Kubernetes Network Solution Cilium Getting Started Tutorial
js 图形操作一(兼容pc、移动端实现 draggable属性 拖放效果)
全面讲解GET 和 POST请求的本质区别是什么?原来我一直理解错了
【无标题】目录