hdu-1197-Specialized Four-Digit Numbers
来源:互联网 发布:网络教育一年学费多少 编辑:程序博客网 时间:2024/04/20 03:28
#include<stdio.h>
int main()
{
int i,t,a,b,c;
for(i=2992;i<10000;i++)
{
t=i;
a=b=c=0;
while(t)
{
a+=t%10;
t/=10;
}
t=i;
while(t)
{
b+=t%12;
t/=12;
}
t=i;
while(t)
{
c+=t%16;
t/=16;
}
if(a==b&&a==c)
printf("%d\n",i);
}
return 0;
}
int main()
{
int i,t,a,b,c;
for(i=2992;i<10000;i++)
{
t=i;
a=b=c=0;
while(t)
{
a+=t%10;
t/=10;
}
t=i;
while(t)
{
b+=t%12;
t/=12;
}
t=i;
while(t)
{
c+=t%16;
t/=16;
}
if(a==b&&a==c)
printf("%d\n",i);
}
return 0;
}
- HDU 1197 Specialized Four-Digit Numbers
- HDU 1197 Specialized Four-Digit Numbers
- HDU 1197 Specialized Four-Digit Numbers
- HDU 1197 Specialized Four-Digit Numbers
- HDU 1197 Specialized Four-Digit Numbers
- hdu-1197-Specialized Four-Digit Numbers
- hdu-oj 1197 Specialized Four-Digit Numbers
- HDU 1197 Specialized Four-Digit Numbers
- hdu 1197 Specialized Four-Digit Numbers
- HDU 1197 Specialized Four-Digit Numbers 水题
- hdu-1197 Specialized Four-Digit Numbers
- HDU 1197 Specialized Four-Digit Numbers【水】
- hdu 1197 Specialized Four-Digit Numbers
- HDU - 1197 Specialized Four-Digit Numbers
- hdu 1197 Specialized Four-Digit Numbers
- HDU Specialized Four-Digit Numbers
- 1197 Specialized Four-Digit Numbers
- HDU 1197 Specialized Four-Digit Numbers (水)
- ubuntn系统的语言切换 就是用Ctrl+ spacew切换语言栏
- 3.7 《硬啃设计模式》 第16章 老掉牙系统的重生 - 适配器模式(Adapter Pattern)
- struts2 的配置文件DTD
- Python基础08 面向对象的基本概念
- ubuntu12.04+nginx+fastcg+php5+mysql配置
- hdu-1197-Specialized Four-Digit Numbers
- 将java源码打包成可运行的jar
- WHEN T6.START_END_DIFF <= 20 THEN
- 反序数
- Qt安装—搭建VS2008+QT开发环境
- Web开源测试工具—Selenium介绍(1)
- 5.9 fread和fwrite函数-二进制I/O
- 多关键字排序的方法
- 星号图A