当前位置:网站首页>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 边栏推荐
- leetcode 剑指 Offer 10- I. 斐波那契数列
- eKuiper Newsletter 2022-07|v1.6.0:Flow 编排 + 更好用的 SQL,轻松表达业务逻辑
- Hbuilder 学习使用中的一些记录
- 基于 Kubernetes 的微服务项目整体设计与实现
- tensorflow.keras无法引入layers
- 8.4 Summary of the mock competition
- 全面讲解GET 和 POST请求的本质区别是什么?原来我一直理解错了
- Luogu P1966: [NOIP2013 提高组] 火柴排队 [树状数组+逆序对]
- 明天去订票,准备回家咯~~
- Creo 9.0 基准特征:基准坐标系
猜你喜欢
随机推荐
七夕给自己new一个chatRobot当对象
使用 External Secrets Operator 安全管理 Kubernetes Secrets
画法几何及工程制图考试卷A卷
DPU — 功能特性 — 管理系统的硬件卸载
sql server收缩日志的作业和记录,失败就是因为和备份冲突了吗?
嵌入式实操----基于RT1170 移植memtester做SDRAM测试(二十五)
k-nearest neighbor fault monitoring based on multi-block information extraction and Mahalanobis distance
复现一次循环和两次循环
请问大佬们 ,使用 Flink SQL CDC 是不是做不到两个数据库的实时同步啊
“充钱”也难治快手的“亏亏亏”?
放大器OPA855的噪声计算实例
十一道家常小菜详细攻略[图文并茂]
2022-08-01 回顾基础二叉树以及操作
DTcloud 装饰器
Does flink cdc support synchronization from oracle dg library?
DPU — 功能特性 — 网络系统的硬件卸载
六年团队Leader实战秘诀|程序员最重要的八种软技能 - 脸皮薄容易耽误事 - 自我营销
openpyxl to manipulate Excel files
Two-table query average grouping in sql server
MySQL内部函数介绍









