fix: Improve formatting for Pascal's triangle challenge (#35531)
This commit is contained in:
committed by
Aditya
parent
6d24b879f2
commit
51fcc8e509
@ -8,83 +8,21 @@ title: 'Problem 148: Exploring Pascal''s triangle'
|
|||||||
<section id='description'>
|
<section id='description'>
|
||||||
We can easily verify that none of the entries in the first seven rows of Pascal's triangle are divisible by 7:
|
We can easily verify that none of the entries in the first seven rows of Pascal's triangle are divisible by 7:
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
1
|
|
||||||
|
|
||||||
1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
1
|
|
||||||
|
|
||||||
2
|
|
||||||
|
|
||||||
1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
1
|
|
||||||
|
|
||||||
3
|
|
||||||
|
|
||||||
3
|
|
||||||
|
|
||||||
1
|
|
||||||
|
|
||||||
|
|
||||||
1
|
|
||||||
|
|
||||||
4
|
|
||||||
|
|
||||||
6
|
|
||||||
|
|
||||||
4
|
|
||||||
|
|
||||||
1
|
|
||||||
|
|
||||||
1
|
|
||||||
|
|
||||||
5
|
|
||||||
|
|
||||||
10
|
|
||||||
|
|
||||||
10
|
|
||||||
|
|
||||||
5
|
|
||||||
|
|
||||||
1
|
|
||||||
1
|
1
|
||||||
|
1 1
|
||||||
6
|
1 2 1
|
||||||
|
1 3 3 1
|
||||||
15
|
1 4 6 4 1
|
||||||
|
1 5 10 10 5 1
|
||||||
20
|
1 6 15 20 15 6 1
|
||||||
|
</pre>
|
||||||
15
|
|
||||||
|
|
||||||
6
|
|
||||||
|
|
||||||
1
|
|
||||||
However, if we check the first one hundred rows, we will find that only 2361 of the 5050 entries are not divisible by 7.
|
However, if we check the first one hundred rows, we will find that only 2361 of the 5050 entries are not divisible by 7.
|
||||||
|
|
||||||
Find the number of entries which are not divisible by 7 in the first one billion (109) rows of Pascal's triangle.
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
## Instructions
|
## Instructions
|
||||||
<section id='instructions'>
|
<section id='instructions'>
|
||||||
|
Find the number of entries which are not divisible by 7 in the first one billion (10<sup>9</sup>) rows of Pascal's triangle.
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
Reference in New Issue
Block a user