11636 - Hello World!

All about problems in Volume 116. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

noor_aub
New poster
Posts: 26
Joined: Sat Aug 22, 2009 12:16 pm

Gettign W/A on problem 11636

Post by noor_aub »

Any body help me I am getting wrong answer on 11636 no problem.

Code: Select all


remove after A/C

Last edited by noor_aub on Fri Sep 18, 2009 1:37 am, edited 1 time in total.
Igor9669
Learning poster
Posts: 85
Joined: Sun Jun 08, 2008 12:58 pm

Re: Gettign W/A on problem 11636

Post by Igor9669 »

Try this: 1 ,it should help you!!!
Mohsin Reza Razib
New poster
Posts: 12
Joined: Fri Dec 15, 2006 12:57 pm
Location: Dhaka, Bangladesh
Contact:

11636 wrong answer. Pls help

Post by Mohsin Reza Razib »

Accepted. Code removed. Silliest mistake of my life.
Last edited by Mohsin Reza Razib on Sun Oct 11, 2009 6:31 pm, edited 1 time in total.
Mohsin Reza
"The tragedy of life does not lie in not reaching your goal. The tragedy lies in having no goal to reach".- Benajamin Mays
arifcsecu
Learning poster
Posts: 64
Joined: Fri Sep 25, 2009 11:29 am
Location: Chittagong,University of chittagong
Contact:

Re: 11636 wrong answer. Pls help

Post by arifcsecu »

Don't try to create new thread if one exit for a problem
one thread exist for 11636
Try to catch fish rather than asking for some fishes.
arifcsecu
Learning poster
Posts: 64
Joined: Fri Sep 25, 2009 11:29 am
Location: Chittagong,University of chittagong
Contact:

Re: Monitor everything they do online

Post by arifcsecu »

aionkinahwowgold wrote:Do you want to monitor what your kids are doing online? Do they chat with ill-intentioned strangers?
Do you doubt that your emoplyees are busy with personal affairs during work-time? Are they trying to copy out company confidential data?
All you need is a smart Internet usage monitoring software to keep an eye on your children and workers. EAM - Employee Internet monitoring software is an ideal choice in this case.
Here we are all child
so post this in adult / gurdians Blog
Try to catch fish rather than asking for some fishes.
naheed
New poster
Posts: 8
Joined: Sun Oct 25, 2009 7:20 pm

11636 -"HELLO WORLD" getting runtime error!!!

Post by naheed »

REMOVED AFTER AC.. :D
Last edited by naheed on Fri Jun 18, 2010 9:02 pm, edited 1 time in total.
helloneo
Guru
Posts: 516
Joined: Mon Jul 04, 2005 6:30 am
Location: Seoul, Korea

Re: 11636 -"HELLO WORLD" getting runtime error!!!

Post by helloneo »

Input description says
Input is terminated by a line containing a negative integer.
naheed
New poster
Posts: 8
Joined: Sun Oct 25, 2009 7:20 pm

11636 -"HELLO WORLD" getting WA !!!!

Post by naheed »

The following code is producing wa...:( plz help..

Code: Select all

#include <stdio.h>
int j=1;
int power(int i){
	int k;
	int l=1;
	 for(k=0;k<i;k++)
		l=2*l;
return l;
}
int main(){
int n,p;
   
while( scanf("%d",&n)==1  && (n!=-1) ){     
p=1;
while(power(p)<n)
	p++;
if(n==1)
printf("Case %d: 0\n",j);
else
printf("Case %d: %d\n",j,p);
j++;
}
return 0;
}
RubenRamalho
New poster
Posts: 4
Joined: Fri Jun 25, 2010 8:33 pm

Problem 11636 -"HELLO WORLD" TLE

Post by RubenRamalho »

I'm getting TLE for this problem.
It really doesn't seems inefficiency to me.. What am I missing?

Code removed, aldready got accepted :)
naseef_07cuet
Learning poster
Posts: 62
Joined: Sat Nov 21, 2009 10:17 pm
Location: CUET,Chittagong,Bangladesh

Re: 11636 -"HELLO WORLD" getting runtime error!!!

Post by naseef_07cuet »

submit your code... :)
If you have determination, you can do anything you want....:)
RubenRamalho
New poster
Posts: 4
Joined: Fri Jun 25, 2010 8:33 pm

Re: 11636 -"HELLO WORLD" getting runtime error!!!

Post by RubenRamalho »

I aldready got it accepted, with 0:00.008 btw..
I was a stupid mistake, the program didn't terminate when a negative number was inserted.
So it had been waiting for more input even though there wasn't any further input..

But thank you :)
naseef_07cuet
Learning poster
Posts: 62
Joined: Sat Nov 21, 2009 10:17 pm
Location: CUET,Chittagong,Bangladesh

Re: 11636 -"HELLO WORLD" getting runtime error!!!

Post by naseef_07cuet »

Congrates Ruben.
Happy Coding :)
If you have determination, you can do anything you want....:)
shaon_cse_cu08
New poster
Posts: 50
Joined: Tue May 25, 2010 9:10 am
Contact:

Re: 11636 -"HELLO WORLD" getting WA !!!!

Post by shaon_cse_cu08 »

Input is terminated by a line containing a negative integer.
One mistake we programmer's often did is that "We think negative integer = -1"

But It can be any negative integer....i,e,. -1, -2, -3 etc...

Change ur code in the section " while(...&& (n!=-1)) to (n>0)"...

I thing that should do the work.....TC :) :)
I'll keep holding on...Until the walls come tumbling down...And freedom is all around ..... :x
Md. Mijanur Rahman
New poster
Posts: 9
Joined: Thu Nov 13, 2008 2:08 pm

Re: 11636 -why WA, plz help!!!!

Post by Md. Mijanur Rahman »

#include<stdio.h>
int main()
{
long int count,paste,n,i;
i=1;
while(scanf("%ld",&n)==1)
{
count=1;paste=0;
if(n==-1)break;
else if(n==1)
paste=0;
else
{
while(1)
{
count*=2;
if(count>=n){paste++;break;}
else paste++;
}
}
printf("Case %ld: %ld\n",i++,paste);

}
return 0;
}
shondhi
New poster
Posts: 25
Joined: Tue Oct 02, 2012 5:24 pm
Location: Chittagong
Contact:

11636 - Hello World!, why wa?

Post by shondhi »

Code: Select all

Got AC
Last edited by shondhi on Fri Apr 12, 2013 5:44 pm, edited 1 time in total.
Post Reply

Return to “Volume 116 (11600-11699)”