sicily 1240. 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<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); } ; }…
比赛链接: 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…
例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…
题目描述 将中缀表达式(infix expression)转换为后缀表达式(postfix expression).假设中缀表达式中的操作数均以单个英文字母表示,且其中只包含左括号'(',右括号‘)’和双目算术操作符+,-,*,/. 输入格式 第一行是测试样例个数n.以下n行,每行是表示中缀表达式的一个字符串(其中只包含操作数和操作符和左右括号,不包含任何其他字符),长度不超过100个字符. 输出格式 为每一个测试样例单独一行输出对应后缀表达式字符串(其中只包含操作数和操作符,不包含任何其他字符…