Kirubha gives a pen to karan on first day. The next day, it will be doubled and so on. Totally how many pens are given in 10 days?


Solution Required KIRUBHAKARAN DURAIRAJ on 8-Sep-2016 10:37

Kirubha gives a pen to karan on first day. The next day, it will be doubled and so on. Totally how many pens are given in 10 days?
on 8-Sep-2016 11:31

n=int(input()) count=1 for i in range(1,n): new_num=count*2 count=count+new_num print(count) ans: 19683
on 8-Sep-2016 16:40

719
on 9-Sep-2016 11:17

2048
on 9-Sep-2016 11:23

1023
on 9-Sep-2016 11:28

Formula = (2^n)-1. Logic: 1st day = 1 =1 =(2^1) -1 2nd day = 1+2 =3 = (2^2) -1 3rd day = 1+2+4=7 = (2^3)-1 .......... 10th day=(2^10)-1 =1023.
on 12-Sep-2016 08:53

1023 is the answer
on 12-Sep-2016 08:54

1023
on 12-Sep-2016 08:54

1+4=5 is n^1
on 12-Sep-2016 11:03

1023
on 12-Sep-2016 11:26

1023 is the answer
on 12-Sep-2016 21:45

1023
on 12-Sep-2016 22:46

1st day 1 2nd day 2 3rd day 2^2 4th day 2^3 . . . 10th day 2^9 total no. of pens=1+2^1+2^2+......+2^9=2047 pens
on 15-Sep-2016 10:41

1023 pens
on 17-Sep-2016 10:26

2047 pens
on 17-Sep-2016 12:33

1 2 4 8 16 32 64 128 256 512 ------- tot:1023 ans:1023
on 17-Sep-2016 14:10

1023
on 19-Sep-2016 15:05

1023
on 22-Sep-2016 09:01

what is the answer
on 22-Sep-2016 09:07

ok
Solution:


Formula = (2^n)-1. Logic: 1st day = 1 =1 =(2^1) -1 2nd day = 1+2 =3 = (2^2) -1 3rd day = 1+2+4=7 = (2^3)-1 .......... 10th day=(2^10)-1 =1023.