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

×

NZEC in calculating Number of factors

https://www.codechef.com/problems/NUMFACT

I am trying to solve this question, but I am getting NZEC error. This is my solution https://www.codechef.com/viewsolution/8966096 Can anyone help me fixing this issue.

Thanks.

asked 16 Dec '15, 19:04

arpit728's gravatar image

1★arpit728
6831868
accept rate: 10%


Large numbers will easily overflow your 'product' variable they are multiplied to.

link

answered 18 Dec '15, 04:54

kr0oze's gravatar image

0★kr0oze
1123
accept rate: 41%

edited 18 Dec '15, 04:54

how should I resolve this, faced this problem many times

(18 Dec '15, 10:40) arpit7281★

Use some Bigint implementation or go around the problem(e.g. do what you are doing for all the numbers on input and merge the results)

(18 Dec '15, 20:34) kr0oze0★
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:

×639
×303
×199
×98
×84
×56
×30

question asked: 16 Dec '15, 19:04

question was seen: 587 times

last updated: 18 Dec '15, 20:34