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

×

Why allways tme exceed error arises.....?

t=raw_input() pos=t.find(" ") num1=t[:pos] num2=t[pos+1:] count=0 num1=int(num1) num2=int(num2) i=0 while i<num1: numbers=input() if numbers%num2==0: count=count+1 i=i+1 print count

asked 08 Dec '13, 14:06

archit_jain08's gravatar image

5★archit_jain08
1111
accept rate: 0%


Please post the link to the question in your query. Otherwise we cannot help.

link

answered 08 Dec '13, 15:11

infinitum's gravatar image

3★infinitum
1.2k21116
accept rate: 10%

http://www.codechef.com/problems/INTEST

The problem stated "to verify whether the method you are using to read input data is sufficiently fast". Try fast input methods.

link

answered 08 Dec '13, 15:52

krakspider's gravatar image

2★krakspider
1
accept rate: 0%

edited 08 Dec '13, 15:52

Use int(raw_input()) instead of input() as input is considerably slower.

link

answered 08 Dec '13, 16:10

kcahdog's gravatar image

3★kcahdog
10.0k2854129
accept rate: 14%

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:

×241

question asked: 08 Dec '13, 14:06

question was seen: 687 times

last updated: 08 Dec '13, 16:10