Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 113 results for
codechef
- Page 1
Codechef Easy Problem - Nuclear Reactors
Programming
Software Development
12 Years Ago
by prakhs
http://www.
codechef
.com/problems/NUKES I'm getting time limit exceeded in …[j]); return 0; } I'm getting this error : http://www.
codechef
.com/submit/complete/52434-4579--506325bda1ce2
A Maths question - codechef
Programming
Software Development
12 Years Ago
by prakhs
Hi, I came across one question from
codechef
. [Click Here](http://www.
codechef
.com/problems/J7) Here, we are given P and S…
Re: Codechef Easy Problem - Nuclear Reactors
Programming
Software Development
12 Years Ago
by L7Sqr
I believe you are over-thinking this. Try to abstract the problem into something you already understand. Here is a hint: ones, tens, hundreds, thousands, ...
Re: Codechef Easy Problem - Nuclear Reactors
Programming
Software Development
12 Years Ago
by prakhs
not getting it can u tell me in which test case it exceeds time-limit. I have made a non-recursive solution also, this also is getting time limit exceeded in "test 8; Approx_N_value 100" and it is running well for "test 1 to 7; Approx_N_value 10 to 1000000000". here's a non-recursive code #include <stdio.h> #…
Re: Codechef Easy Problem - Nuclear Reactors
Programming
Software Development
12 Years Ago
by prakhs
A more better version #include <stdio.h> #include <math.h> main() { long int A; int N, k; scanf("%lu %d %d", &A, &N, &k); int a[k]; /* stores no. of particles in a chamber */ int j; long int power[101]; for (j = 0; j < k; ++j) a[j] = 0; for…
Re: Codechef Easy Problem - Nuclear Reactors
Programming
Software Development
12 Years Ago
by L7Sqr
This is essentially a base-N problem. You are given a set of items, a base to convert them into and a maximum precision (how big the number can be). To do this you simply calculate the modulus and remainder as long as you have particles left. You do not need to calculate a powers lookup table or any other trickery for this one. Here is an example:…
Re: Codechef Easy Problem - Nuclear Reactors
Programming
Software Development
12 Years Ago
by nitin1
it is the most easy problem i have seen in my coding carrier. here goes the solution ;' #include<stdio.h> int main() { int a,k,n; scanf("%d%d%d",&a,&n,&k); while(k--) { printf("%d ",a%(n+1)); a/=(n+1); }…
Re: Codechef Easy Problem - Nuclear Reactors
Programming
Software Development
12 Years Ago
by L7Sqr
@nitin1: I doubt that **prakhs** was looking for the solution outright. Explanation of how to derive the solution and, in general, how to approach these problems is a more meaningful response than what you provided. Certainly, if all that was required was a solution the site already provides that outright.
Re: Codechef Easy Problem - Nuclear Reactors
Programming
Software Development
12 Years Ago
by nitin1
okay! sory for that ! will not do this type of mistake in future! @ L7Sqr Can you tell me what exactly that base-N problem you mean by ? please explain a little bit. I am eager to know a second approch of this question. The code i have provided is done by me just in 3 minutes after reading problem. way which you are telling is different from my …
Re: Codechef Easy Problem - Nuclear Reactors
Programming
Software Development
12 Years Ago
by L7Sqr
I was referring to the problem of converting a decimal number (the number of particles in this case) to a number in a different base (octal, hexidecimal, etc.). The base, in this problem, is provided by the number of particles that can be held in an individual chambers. Here is another desccription [of base conversion](http://www.mathsisfun.com/…
Re: Codechef Easy Problem - Nuclear Reactors
Programming
Software Development
12 Years Ago
by nitin1
okay! after converting it then ? what is the next step it this ?
Re: Codechef Easy Problem - Nuclear Reactors
Programming
Software Development
12 Years Ago
by prakhs
I'm also not getting what do you mean by base-N problem? Can some 1 please tell me what is the fault in my code ? why it exceeds time limit ?
Re: Codechef Easy Problem - Nuclear Reactors
Programming
Software Development
12 Years Ago
by prakhs
i got it how it is base-N problem. But still i'm unable to find fault in my solution.
Re: Codechef Easy Problem - Nuclear Reactors
Programming
Software Development
12 Years Ago
by L7Sqr
I cant answer that; I am not the judge and I do not have the input that is causing the errors. Perhaps you could request the set of test inputs from the host. At that point you could check for yourself.
Re: A Maths question - codechef
Programming
Software Development
12 Years Ago
by deceptikon
> Can any 1 please help me with it? What kind of help do you want? You clearly haven't done anything yourself, so it's hard to construe "help" to mean anything except "tell me the solution and how to code it".
Re: A Maths question - codechef
Programming
Software Development
12 Years Ago
by prakhs
The solutions are given in the site. Can any one explain the solutions.
Re: A Maths question - codechef
Programming
Software Development
12 Years Ago
by Adak
You have two constraints and one goal. The goal is ez - maximum volume of the box. (length x width x height) The two constraints are: 1) The length of wire to make around the edges of the box (there are 4 horizontal edges on the bottom square of the box, 4 on the top square of the box, and 4 on the vertical edges of the box. See this picture: …
Challenge Question 2
Programming
Software Development
15 Years Ago
by mrnutty
… see some solutions. Here is the [URL="http://www.
codechef
.com/problems/DCE05/"] page [/URL] to the problem as…
Re: Challenge Question 2
Programming
Software Development
15 Years Ago
by mrnutty
Thats the slowest your program should run. I will test your code with
codechef
. It will advise me if your program runs slower than 1 second. There will be up to 10^6 test cases.
Re: Challenge Question 2
Programming
Software Development
15 Years Ago
by mrnutty
…] It should be right. There is no input file. The
codechef
compiler compiles the code trying some input cases. The input…
Problem with matrix
Programming
Software Development
15 Years Ago
by ishandoshi
… on my machine,it displays a Wrong Answer message at
codechef
where i need to give this. Can anyone help me…
How to input two integers in Python
Programming
Software Development
14 Years Ago
by lionaneesh
… trying to solve the problem Present at [url]http://www.
codechef
.com/problems/INTEST/[/url] I have made a small Python…
Online Programming
Programming
Software Development
14 Years Ago
by myk45
… i can practice programming? i mean sites like TopCoder, SPOJ,
CodeChef
. But i needed a site where there is an explanation…
Challenging problems
Programming
Software Development
14 Years Ago
by Rahul.menon
I Wanted some good patterns questions that is challenging. Also some logic teasing questions. forums like
codechef
have questions bit too absurd to understand. It would be really good if someone could provide questions easy to understand yet logically challenging.
Graph And Data Structure
Programming
Software Development
13 Years Ago
by melfoy
… a problem for finding the best path [url]http://www.
codechef
.com/JULY11/problems/LOKBIL/[/url] And couldn't think something…
Which one
Programming
Software Development
13 Years Ago
by Anuradha Mandal
Which one is update software for c++ and c language. Some practice center such as
Codechef
,, Uva online judge , I submit a right code but they said the code has compiling error such as it does not familiar with conio.h,getch() etc. I use Dev c++. How can I solve this problem. Please help.
Finding last non zero digit
Programming
Software Development
13 Years Ago
by swissknife007
… the code for the following problem [URL="http://www.
codechef
.com/problems/TESTTT5"]link[/URL]. I am getting a…
Can any one explain me the solution to this problem.
Programming
Software Development
12 Years Ago
by prakhs
http://www.
codechef
.com/COOK27/problems/TOURNAM Thanks in advance !
Please help me debug the code!
Programming
Software Development
12 Years Ago
by prakhs
…; }} return 0; } The question can be found [Here](http://www.
codechef
.com/problems/TOURMAP)
sigsev error
Programming
Software Development
12 Years Ago
by mayankjain05_1
this is the question. www.
codechef
.com/problems/CTEAMS i wrote this code http://ideone.com/h5Gimy it gives success but when i pass an input it gives sigsev error.please someone help!!
1
2
3
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
Backlink Auditor
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC