【CodeForces】[630C]Lucky Numbers
2016-03-18 07:30
489 查看
lucky numbers
也就是只包含7或8的数字
问不超过n位的lucky numbers有多少
一道排列组合题目
#include<stdio.h> #include<math.h> int main() { long long a[60]= {0}; for(int i=1; i<56; i++) a[i]=pow(2,i)+a[i-1]; int n; while(scanf("%d",&n)!=EOF) { printf("%lld\n",a ); } return 0; }
题目地址:【CodeForces】[630C]Lucky Numbers
相关文章推荐
- C#查找字符串所有排列组合的方法
- js实现简单排列组合的方法
- PICT3.3用户指南学习笔记
- 排列组合
- 变态组合数C(n,m)求解
- Codeforces Round #197 (Div. 2)
- Codeforces Round #198 (Div. 1)
- Codeforces 405E Codeforces Round #238 (Div. 2)E
- Codeforces 407C Codeforces Round #239 (Div. 1)C
- CodeForces 449A - Jzzhu and Chocolate
- CodeForces 449 B. Jzzhu and Cities
- codeforces 618C. Constellation
- Codeforces Round #265 (Div. 2)
- Codeforces #310 div2 C. Case of Matryoshkas
- 状态压缩DP codeforces 244 Problem C. The Brand New Function 和 codeforces 165 E. Compatible Numbers
- codeforces 16 Problem E fish
- Codeforces Round332 部分题解
- CodeForces 603A_Alternative Thinking (DP)
- CodeForces 602B_Approximating a Constant Range_DP
- Codeforces round #247 for Div. 2