[ATM problem] What is wrong here? I am getting NZEC error.
package main; import java.util.Scanner; public class Main { public static void main(String[] args) { int balance; double withdraw = 0; Scanner s=new Scanner(System.in); System.out.println("Enter...
View ArticleKPRIME - Simple code in java throwing NZEC. pls help me figure out why
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { /** * @param args */ public static void main(String[] args) throws Exception{ //...
View ArticleTrouble on even number
Sums of consecutive positive integersFilename: Consecutive.javaInput file: consecutive.inConsider the following positive integers: 5, 25, 29, 41, and 100. Each of these numbers can be expressed as a...
View Articlewhat is wrong in this code??(Life universe......program)
class Input1 { public static void main(String args[]) { int a[]={1,2,88,42,99}; int i=0; while(a[i]!=42) { System.out.println(a[i]); i++; }; } }
View ArticleLife, the Universe, and Everything - Run Time Error
So the exercise is: Your program is to use the brute-force approach in order to find the Answer to Life, the Universe, and Everything. More precisely... rewrite small numbers from input to output. Stop...
View Articleperl query
Can take this file format and start perl script Inputs to perl script 1. 2 files with same format will be arguments to script 2. Threshold value option such as “-th 5k/M”. This option would mean that...
View Articletime complexity of empty block
does an empty block of statement also affect the time complexity of the code ? eg if(condition) { } else { }
View ArticleCOUNTPAL - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATIONThe problem can be solved easily by dynamic programming:F(i) = CountPal(s') for s' is the subtring of s[1]..s[i]so F(i) = sum of F(j) with j < i...
View ArticleInput and output formatting in c++
Hi all, I'm a newbie at C++ and hence my code might seem primitive.I came across this question: Write a C++ program to convert Celsius degrees to Fahrenheit. The program should request the starting...
View ArticleDifficulty level of questions in contests.
In any of the contests, are the problems listed according to the difficulty level. If not is there any way, I could figure out the difficulty of the problems? Opening each and every question is one way...
View Article[lead game]PLEASE HELP ME TO FIND MY MISTAKE
#include<iostream> using namespace std; long int a[100000][2]; int main() { int x; cin>>x; int large=0,index=0; for(int i=1;i<=x;++i) { for(int j=1;j<=2;++j) { cin>>a[i][j]; }...
View Articlehow does the rating system work?
I keep getting WA in my answers for recent competitions, and I began to wonder how it affects my rating, which lead me to the title's question.
View Articlesegment tree implimentation
void seg_ment(int node,int b,int e){ if(b==e){ segment_tree[node]=A[b]; } else{ int left=2*node,right=2*node+1; seg_ment(left,b,(b+e)/2); seg_ment(right,(b+e)/2 +1,e); int...
View ArticleHow to get rid of getting NZEC error while submitting solution in java?
To all who are geting NZEC, try using this format in java:import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { try{ //Your Solve...
View ArticleHow to get started with programming?
Guyz M new To This Community :)... Currently M Studing in 11th Class At Kendriya vidyalaya, Subject Computer Science... I Know The little basic About C++.. Guyz if You Teach me, i will be Thank Full To...
View ArticleTaking error need assistance
question :- http://www.hackerearth.com/eksmscom-hiring-challenge/algorithm/inverse-list/ answer :- public static void main(String args[] ) throws Exception { BufferedReader br = new BufferedReader(new...
View ArticleHow to get started with coding?
hi everyone!!! i am a beginner in coding. i just have the basic knowledge of c/c++ taught at the school level. i would like to know from where can i improve my programming skills. i have attempted a...
View ArticleSIGXFSZ runtime error
I am getting SIGXFSZ runtime error for a problem. What is the possible reason for this error?
View ArticleThe C# language
Hi everyone, I am a computer science student who has been doing programming in C# for less than a year. I am new to CodeChef and I tried to solve the Practice problems in the easy section. However, I...
View Article