You are not logged in. Please login at www.codechef.com to post your questions!

×

[closed] help September challenge chef and digit

https://www.codechef.com/SEPT17/problems/CHEFPDIG

the constraints are itself so dangerous , that I am not able to think of a way other then to store it as a string, but what to do next?

asked 03 Oct '17, 12:20

striverlearner's gravatar image

3★striverlearner
46910
accept rate: 0%

closed 03 Oct '17, 14:26

vijju123's gravatar image

5★vijju123 ♦♦
15.5k12066

Did you even try reading the editorial?

(03 Oct '17, 14:25) vijju123 ♦♦5★

The question has been closed for the following reason "Issue Resolved." by vijju123 03 Oct '17, 14:26


You can just loop from 65 to 65+26 and and check if a digit is present in the original array or not. Complexity would be $ O(26N) = O(N) $. Solution here: https://www.codechef.com/viewsolution/15182329

link

answered 03 Oct '17, 12:26

ista2000's gravatar image

4★ista2000 ♦
2.4k723
accept rate: 20%

thank you but I cannot up vote unfortunately

(03 Oct '17, 12:39) striverlearner3★
1

No worries, all that matters is you learnt something. :)

(03 Oct '17, 12:59) ista2000 ♦4★
Answer is hidden as author is suspended. Click here to view.

answered 03 Oct '17, 12:36

raj79's gravatar image

2★raj79
(suspended)
accept rate: 10%

thank you for such a detailed explanation . :)

(03 Oct '17, 12:37) striverlearner3★

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×2,739

question asked: 03 Oct '17, 12:20

question was seen: 287 times

last updated: 03 Oct '17, 14:26