hdu 1197 Specialized …
来源:互联网 发布:mac air与mac pro区别 编辑:程序博客网 时间:2024/05/20 11:27
#include"iostream"
#include"stdio.h"
#include"algorithm"
using namespace std;
int getsum(int k,int quan)
{
int sum=0,a[5];
for(int i=4;i>0;i--)
{
a[i]=k%quan;
k/=quan;
sum+=a[i];
}
return sum;
}
int main()
{
int sum10,sum12,sum16,a[4];
int k;
for(k=1000;k<10000;k++)
{
sum10=getsum(k,10);
sum12=getsum(k,12);
sum16=getsum(k,16);
if(sum10==sum12 &&sum10==sum16 &&sum12==sum16)
printf("%d\n",k);
}
}
- hdu 1197 Specialized …
- ZZULI_SummerPractice(3) HDU 1…
- HDU 1075 What Are You Talking …
- hdu 2039 三角形 /…
- hdu 1303 doubles …
- hdu 1374 || poj22…
- hdu 2708 || poj21…
- HDU 1423 Greatest Common Increas…
- hdu 1497 Simple Library Manageme…
- HDU 1242 Rescue
-  
- 集线器 交换机 路由器 网桥 …
-
- hdu 1798 Tell me the area …
- HDU 1028 Ignatius and the Princ…
- HDU 1025 Constructing Roads In …
- HDU 4251 The Famous ICPC Team Ag…
- hdu 1806 Frequent values 线段…
- poj 2739 sum of&n…
- hdu 1065 I Think&…
- hdu 1056 hangover&nbsp…
- 我的博客今天0岁324天了,我领取了…
- poj 3299 humidex
- hdu 1197 Specialized …
- hdu 2734 quicksum //简单校验算法
- hdu 1304 A Contes…
- poj 3006 Dirichlet&#03…
- 关于int64型的说明
- hdu 1374 || poj22…
- hdu 2708 || poj21…
- hdu 2708 //可AC
- about: scanf的返回值