排列组合:poj 1019 Number Sequence

比较简单的一道数学问题,关键在于要有自己的思路和代码实现,注意多位数会占多个空间(长度)。

题目链接:http://poj.org/problem?id=1019

参考题解:

(1)小優YoUhttp://blog.csdn.net/lyy289065406/article/details/6648504

(2)kuangbi: http://www.cnblogs.com/kuangbin/archive/2011/07/21/2113279.html

(3)ACShiryu's Blog: http://www.cnblogs.com/ACShiryu/archive/2011/08/05/2129009.html

参考代码+部分解释:

#include 
  
   
#include 
   
    
#include 
    
     
#include 
     
#include 
      
       
#include 
       
         #include 
        
          using namespace std; typedef long long ll; const int maxn = 7e4+10; int a[maxn]; void init() { a[1]=1; for(int i=2;i
         
          =temp) break; } for(int j=ans-temp;j>0;j--) i/=10;//得到temp指向的那个位置 return i%10; } int main() { // freopen("input.txt","r",stdin); init(); int T;cin>>T; while(T--){ int n;cin>>n; cout<
          
           <
           
          
         
        
       
      
    
   
  

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值