Johnny and the Beanstalk problem
First, of all description of this question is too bad. But, i managed to solve it.But, i have a doubt in this problem when the previous count or sum is less than the current input of the user then i...
View ArticlePlease tell what's wrong in input way in ALGFACT Problem
Wrong answer is shown on submission. My code is in Python:import math N=input("Enter the value of N: ") if N<10: i=0 T=[0,1,2,3,4,5,6,7,8,9] result=T print "Enter terms" while (i<N): T[i]=input()...
View ArticleATM problem please tell whats wrong..
x,y=input().split() y=float(y) if(x>0andx<=2000)and(y>0andy<=2000)and(float(x)+0.5<=y)and(x%5==0): y=y-x-0.5 print("%.2f"%y) else: print("%.2f"%y)
View ArticleWA in Rescue Balin
I dont understand why this code is giving WA forques: http://ww2.codechef.com/problems/BYTESDcode: http://ideone.com/vEiSdFcan ne1 pls point out the error...or find a case where the code may be...
View Articlei am not getting this unexpected output..can u explain it??
#include<stdio.h> #define FUN(arg) do\{\ if(arg)\ printf("CODECHEF...", "\n");\ }while(--i)\ int main() { int i=2; FUN(i<3); return 0; } output-CODECHEF...CODECHEF...
View ArticleHappy Birth Day Code Chef !!!!!
A very heart full congratulations to all the Code Chef organizers , participants on the 4rth Birth Day of Code Chef . I am a new user , registered i guess in September 2012 , and started participation...
View ArticleHow to increase ?
Hello everyone,Can anyone tell me that how can I increase my reputation so that I can vote for questions & comments .
View ArticleHow to prepare for GATE??
Hi friends, I am a B.Tech student. My ultimate passion is teaching.According to me teaching is most scared profession. I always love to share my knowledge, whatever I know. In order to become a...
View ArticleArt Of Reading Code
Hello everyone,I often find it hard to read other's code than to write mine own version of code but competitive programming is not just all about writing codes. I have often heard people that you learn...
View ArticleWhy no Summer Internship Contests ?
@admin and users : Don't you guys think that there should be hiring contests or something like that on Codechef, kind of like what they had on Hacker Earth this month. I mean we do have excellent...
View ArticleSPOJ RRANGE
I am trying to solve this problem RRANGE but cannot get an efficient approach with segment trees. I know I have to build the segment tree for the difference sequence but am unable to frame the complete...
View Articlefactorial question
count=0 t=input() def z(x): answer=0 while(x>5): x=x/5 answer=answer+x return answer while(count<t): print z(input()) count+=1 .......... ......... ........ this is my code.....it gives me the...
View ArticleBESTBATS:Getting wrong ans
sumone can please tell what is the mistake in following code...i am getting wrong answer http://www.codechef.com/viewsolution/2187870
View ArticleMSTICK - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYSIMPLEPREREQUISITESRange Minimum Query, Simple MathPROBLEMYou are given N matchsticks arranged in a straight line, with their rearends touching each other. You are...
View ArticleWhere are some editorials?
I don't understand why the editorials for some problems (probably harder) are missing? first exxample from april challenge - http://www.codechef.com/APRIL13/problems/STRQUERY - and for this month I'm...
View ArticleIs there any better solution to find the shortest path
I have an array in which in each row , all the vertices are connected. eg: 0 3 4 6 2 0 1 2 5 here there is a direct path in between each of the two nodes in each row if we take row1: 0 is connected...
View ArticleNZEC Error: Python
def main():n = int(raw_input()) initList = [] tempMax = 0 for i in range (0,n): initList.append(raw_input()) initList.sort() i = 0 for i in range (0,n-1): l0 = len(initList[i]) l1 = len(initList[i+1])...
View Articlepython runtime NZEC error
I looked at all previous post here in the forum, but I still can't figure out why I'm getting this NZEC here. I'm trying to solve SALARY, http://www.codechef.com/problems/SALARY and here are my...
View ArticleLUCKY10 Getting Worng Answer.
I got all the test cases mentioned in the question and cases given as counter cases in the forum also correct.And i tried many test cases of mine.And seems like correct to me.but still getting wrong...
View Article