poj 2719 Faulty Odometer】的更多相关文章

Description You are given a car odometer which displays the miles traveled as an integer. The odometer has a defect, however: it proceeds from the digit 3 to the digit 5, always skipping over the digit 4. This defect shows up in all positions (the on…
Faulty Odometer Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=4278 Description You are given a car odometer which displays the miles traveled as an integer. The odometer has a defect, however: it proceeds from…
Faulty Odometer Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 9301   Accepted: 5759 Description You are given a car odometer which displays the miles traveled as an integer. The odometer has a defect, however: it proceeds from the digi…
Description You are given a car odometer which displays the miles traveled as an integer. The odometer has a defect, however: it proceeds from the digit 3 to the digit 5, always skipping over the digit 4. This defect shows up in all positions (the on…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4278 #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; ] = {,,,,,,,,,,}; ] = {,,,,,,,,,,}; int main() { //freopen("E:\\acm\\input.txt&…
#include<iostream> #include<stdio.h> using namespace std; ]; int _pow(int m,int n); int main(){ //freopen("test.txt","r",stdin); int i; int num; dight[] = ; dight[] = ; ; i < ; i++) { dight[i] = _pow(,i-) + dight[i-] + *…
十进制转八进制的变形: #include<stdio.h> int main() { int n; while(scanf("%d",&n)!=EOF&&n) { ; int m=n; ,x; while(n) { x=n%; )x--; )x--; sum+=ret*x; ret*=; n/=; } printf("%d: %d\n",m,sum); } ; }…
例25    确定进制 问题描述 6*9 = 42 对于十进制来说是错误的,但是对于13进制来说是正确的.即 6(13)* 9(13)= 42(13),因为,在十三进制中,42 = 4 * 13 + 2 = 54(10). 编写一个程序,输入三个整数p.q和r,然后确定一个进制B(2<=B<=16),使得在该进制下 p * q = r.如果 B有很多选择,输出最小的一个.例如,p = 11,q = 11,r = 121.则有 11(3) * 11(3)= 121(3),还有 11(10)* 1…
比赛链接: http://vjudge.net/contest/view.action?cid=47644#overview 比赛来源: 2012 ACM/ICPC Asia Regional Tianjin Online 果然我还是很受外界影响啊~~~这场打得好烂~~~ 155 / 175 Problem A HDU 4278 Faulty Odometer (水题, 简单的数位DP) 155 / 345 Problem B HDU 4279 Number  (打表找规律)   86 / 41…
Faulty Odometer Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2102    Accepted Submission(s): 1456 Problem Description You are given a car odometer which displays the miles traveled as an inte…