ESPR17D - EDITORIAL

PROBLEM LINKS :

Practice

Author : saif_husain

DIFFICULTY :

Easy

PREREQUISITES :

basic maths

PROBLEM :

Given the number of sticks N, obtain the largest possible LED number from it.

EXPLAINATION :

The problem doesn’t required any special algorithm.

More the number of digits larger the number obtained.

With minimum 2 sticks we get a new digit i.e. 1

As 2<=N<=100, the only thing we need to check is whether N is even or odd.

if N is even the resultant number will contain only 1s. If it is odd we can use 7 at leftmost place as it requires only 3 sticks followed by (n-3) 1s.

SOLUTION :

link to solution

Nice initiative but Framing of this editorial is not right. You must use proper format of HTML and their tags so that it become eye catchy for all the viewers. Just have take a look of other editorial at codechef.

Thank you , It was my first editorial. First I used some mentioned rules in editorial format but it doesn’t work. Now I used basic html tags. Its working now.

2 Likes