specialized专题

1014 Specialized Four-Dig

//水水题#include <iostream>using namespace std;int transfer(int a,int num){int sum=0;int b;while(a){b=a%num;a=a/num;sum+=b;}return sum;}int main(){int decc,shier,liu;for (int i=1000;i<=9999;i++){dec

HDU Specialized Four_Digit Numbers

题目传送门: http://acm.hdu.edu.cn/game/entry/problem/show.php?chapterid=1&sectionid=2&problemid=24 本题核心是基本功是进制转换,分解方法是除模取余法,写三个函数比较清晰。 #include<stdio.h>using namespace std;//HDU Specialized Four_Digit

杭电OJ 1197. Specialized Four-Digit Numbers

题目描述: Problem Description Find and list all four-digit numbers in decimal notation that have the property that the sum of its four digits equals the sum of its digits when represented in hexadecimal