1 Star 2 Fork 1

wyloving / TeachingAndLearing

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
1020_数字识别.cpp 332 Bytes
一键复制 编辑 原始数据 按行查看 历史
小晶 提交于 2022-08-25 17:20 . update NoiOj/1020_数字识别.cpp.
#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
int main(){
int x,w;
cin>>x;
w=floor(log10(x))+1;
cout<<w<<endl;
switch(w){
case 4:
cout<<x/1000<<endl;
case 3:
cout<<x/100%10<<endl;
case 2:
cout<<x/10%10<<endl;
case 1:
cout<<x%10<<endl;
}
return 0;
}
1
https://gitee.com/wyloving/TeachingAndLearing.git
git@gitee.com:wyloving/TeachingAndLearing.git
wyloving
TeachingAndLearing
TeachingAndLearing
master

搜索帮助