Advertisement
erfanul007

Timus 1083

Dec 26th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int n,total,i=0,ln,k;
  5. char s[25];
  6. scanf("%d %s",&n,s);
  7. ln=strlen(s);
  8. total=n;
  9. while(1){
  10. i++;
  11. k=ln*i;
  12. if((n-k)<=0)
  13. break;
  14. total=total*(n-k);
  15. }
  16. printf("%d\n",total);
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement