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

×

GGBUNNY - Editorial

PROBLEM LINK:

Practice Contest

Author: Suraj Kumar Tester: Rishabh Gupta Editorialist: Suraj Kumar

DIFFICULTY:

EASY

PREREQUISITES:

Binary search

PROBLEM:

You are given an array of N inegers and another integer K, you need to count the total number of elements of the array which are a positive power of K.

EXPLANATION:

In order to solve this problem first of all store all the positive powers of K in an Array and then you can search this array for each of the N integers. You can search the array using binary search.

AUTHOR'S AND TESTER'S SOLUTIONS:

Author's solution can be found here. Tester's solution can be found here.

RELATED PROBLEMS:

asked 24 Jan '17, 18:57

surajumang08's gravatar image

3★surajumang08
5
accept rate: 0%

edited 25 Jan '17, 14:12

admin's gravatar image

0★admin ♦♦
19.0k348495533

toggle preview
Preview

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:

×14,441
×3,202
×1,051
×821
×1

question asked: 24 Jan '17, 18:57

question was seen: 664 times

last updated: 25 Jan '17, 14:12