当前位置:网站首页>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 边栏推荐
- Is there a problem with writing this?How to synchronize data in sql-client
- 基于 Kubernetes 的微服务项目整体设计与实现
- 手机上流行的各类谜语
- Going to book tickets tomorrow, ready to go home~~
- Neuron Newsletter 2022-07|新增非 A11 驱动、即将支持 OPC DA
- Walk 100 trick society
- 2022/8/4 考试总结
- 2022.8.3
- 请问如果想往mysql里面写数据,直接用flink-connector-jdbc就可以吧,可是我在f
- DPU — 功能特性 — 安全系统的硬件卸载
猜你喜欢

DPU — 功能特性 — 网络系统的硬件卸载

使用稀疏 4D 卷积对 3D LiDAR 数据中的运动对象进行后退分割(IROS 2022)

Xcode10的打包方式distribute app和启动项目报错以及Xcode 打包本地ipa包安装到手机上

Creo 9.0 基准特征:基准平面

工程制图试题

【Excel实战】--图表联动demo_001

How to replace colors in ps, self-study ps software photoshop2022, replace one color of a picture in ps with another color

Example of Noise Calculation for Amplifier OPA855

Thinking and summary of the efficiency of IT R&D/development process specification

sql server中 两表查询 平均数 分组
随机推荐
线程之Happens-before规则
Happens-before rules for threads
XSS靶机通关以及XSS介绍
Three solutions to solve cross-domain in egg framework
Two-table query average grouping in sql server
CCVR基于分类器校准缓解异构联邦学习
seata源码解析:TM RM 客户端的初始化过程
工程制图直线投影练习
16 kinds of fragrant rice recipes
IT研发/开发流程规范效能的思考总结
施一公:科学需要想象,想象来自阅读
Example of Noise Calculation for Amplifier OPA855
Assembly language (8) x86 inline assembly
轩辕实验室丨欧盟EVITA项目预研 第一章(四)
Luogu: P2574 XOR的艺术 [线段树]
【LeetCode】623. Add a row to the binary tree
Overall design and implementation of Kubernetes-based microservice project
MQTT X Newsletter 2022-07 | 自动更新、MQTT X CLI 支持 MQTT 5.0、新增 conn 命令…
(转)[Json]net.sf.json 和org.json 的差别及用法
Creo 9.0 基准特征:基准平面