fctrl2

Upload: rachel-wilson

Post on 01-Mar-2016

2 views

Category:

Documents


0 download

DESCRIPTION

Solution for SPOJ problem named FCTRL2

TRANSCRIPT

  • #include

    using namespace std;

    int main(){ int i,n,c,k,t,a[200],total,temp,x,image; cin>>t; while(t--) {a[0]=1; cin>>n; image=n; for(c=0;image>0;c++) { a[c]=image%10; image=image/10; } temp=0; x=0; while(n--) { for(i=0;i=0;k--) cout