CodeChef is a non-commercial competitive programming community
Login
Username (New User? Signup) Password (Forgot Password?)
Signup
Login or
Signup with
Connect
Note
  • Publicize your achievements on your Facebook Wall.
  • Challenge your friends or ask them for help.

Site Navigation

  • PRACTICE
    • Easy
    • Medium
    • Hard
    • Challenge
    • Peer
  • COMPETE
    • All Contests
    • June Long 2012
    • May Cook-Off
    • May Long 2012
  • DISCUSS
    • Forums
    • Blog
    • Wiki
    • Facebook
    • Twitter
  • COMMUNITY
    • CodeChef Meetups
    • Campus Chapters
    • Host your Contest
    • User Groups
    • CodeChef TechTalks
    • All Educational Initiatives
  • HELP
    • Frequently Asked Questions
    • FAQ for problem setters
    • Problem Setting
    • Tutorials
    • Long Contest Ranks
    • Short Contest Ranks
    • Event Calendar
  • ABOUT
    • About CodeChef
    • Team CodeChef
    • Press Room
    • CodeChef Financials
    • CodeChef Sponsorships
    • CEO's Corner
    • Contact Us
    • About Directi
Home » Practice(easy) » A Very Easy Problem!

A Very Easy Problem!

Problem code: EASYPROB

  • Submit
  • All Submissions

All submissions for this problem are available.

Input

There's no input.

Output

Output some form of these numbers: 137, 1315, 73, 136, 255, 1384, 16385, one per line in the listed order.

Example

Output:
The first two lines of the CORRECT output file are:

137=2(2(2)+2+2(0))+2(2+2(0))+2(0)
1315=2(2(2+2(0))+2)+2(2(2+2(0)))+2(2(2)+2(0))+2+2(0)

The correct output file should contain 7 lines.

Author: admin
Date Added: 13-03-2009
Time Limit: 1 sec
Source Limit: 500 Bytes
Languages: CLOJ, CPP 4.3.2, F#, GO, JS, PYTH 3.1.2, SCALA, TCL, TEXT


  • Submit

Comments

  • Login or Register to post a comment.

jyotesh @ 21 Jul 2009 12:00 AM

We have to submit the source code file(.c) or the text file(.txt) outputed after the execution of program.

admin 2 @ 21 Jul 2009 01:17 AM

You can submit either.

james_vinett @ 25 Jul 2009 06:18 AM

I had no idea that TEXT meant that i could just submit my result. I thought TEXT was some new programming language. So i programmed in SCALA. My first. I managed to get the source below 500b but the compile time was killing me!!!! I rewrote the code cutting the run time from .700 to .056 but the source code (@ over 700b) was too large to submit. Still SCALA is sort of cool...

james_vinett @ 25 Jul 2009 06:20 AM

Is there a way to contact others who have submitted code? It would be interesting to see their code if they were willing to share it.

admin 2 @ 26 Jul 2009 07:50 AM

@james Not at the moment.

mecrazycoder @ 29 Jul 2009 05:11 PM

Hi frendz,
I cant understand anything from the above. Can anyone please help me.

vishalb1204 @ 17 Aug 2009 03:32 AM

@anyone I m disappointed with lack of information. i cannot understand the concept. :( i m feeling bashing my head against the wall.

admin 2 @ 17 Aug 2009 05:14 AM

@vishal Please won't do that :) There is a lot of fun associated with trying to figure out such things.

how 2 submit text.??

ajith @ 26 Aug 2009 04:36 PM
how 2 submit text.??

In the list of languages, you

admin @ 26 Aug 2009 05:19 PM

In the list of languages, you will find the option for TEXT.

Not understood!!!!!!!!!!plz 

Arvind Jain @ 15 Sep 2009 05:53 PM

Not understood!!!!!!!!!!plz  F1.

IAM NOT ABLE TO SUBMIT THE

ajit @ 17 Sep 2009 01:33 PM
IAM NOT ABLE TO SUBMIT THE CODE,IT IS GIVING WORNG ANSWER.ALTHOUGH I KNOW THE TRICK OF THE QUESTION..PLEASE HELP ME.....!!!!

You are probably missing out

admin @ 17 Sep 2009 01:54 PM
You are probably missing out some corner cases.

i cant understand the

sivateja @ 18 Sep 2009 06:50 PM
i cant understand the question the given information is not enough

What is that series? cant

jmahesh @ 21 Sep 2009 08:41 PM
What is that series? cant understand anything from that.plz help me out.

Observe that a particular

admin @ 21 Sep 2009 08:59 PM
Observe that a particular number is repeated a number of times.

I was really disappointed to

stolis @ 30 Sep 2009 01:45 AM

I was really disappointed to see this kind of "mysterious crap" here. I was able to find the solution quickly, but I still don't understand why is this problem here. It is just a silly puzzle, it is not a programming problem.

Well, it's a refreshing

admin @ 30 Sep 2009 02:25 PM

Well, it's a refreshing change from the run of the mill programming problems isn't it :)

Can an admin jus check out d

virai @ 5 Oct 2009 01:24 PM

Can an admin jus check out d code n at least tel me d no in which im goin wrong coz iv calculated each n every num, checked d brackets 5 times stil gives wrong ans..

nice recursion problem... but

jcomeau_ictx @ 15 Oct 2009 12:03 AM

nice recursion problem... but why limit it to "text" and "c#2"? lisp and python solutions would be elegant and practical.

got it ported to c#, but the

jcomeau_ictx @ 15 Oct 2009 01:29 AM

got it ported to c#, but the size restriction made it a bear...

You are meant to just solve

triplem @ 15 Oct 2009 06:50 AM

You are meant to just solve it and just type in the results as text - you know all the test cases, so you don't need to submit a program.

hint: write the numbers in

Chamka @ 15 Oct 2009 12:33 PM

hint:

write the numbers in binary.

Thanks, Stephen... I

jcomeau_ictx @ 16 Oct 2009 05:21 PM

Thanks, Stephen... I understood that, but I wanted to be one of the first to submit an actual program... I don't know how the SCALA guy got his in, when the only options are C#2 and TEXT. Anyway, if you scroll through the pages of successful entries, you'll see my C#2 entry there.

2(2(2)+2+2(0))+2(2+2(0))+2(0)

avix @ 25 Oct 2009 02:04 PM

2(2(2)+2+2(0))+2(2+2(0))+2(0) 2(2(2+2(0))+2)+2(2(2+2(0)))+2(2(2)+2(0))+2+2(0) 2(2(2)+2)+2(2+2(0))+2(0) 2(2(2)+2+2(0))+2(2+2(0)) 2(2(2)+2+2(0))+2(2(2)+2)+2(2(2)+2(0))+2(2(2))+2(2+2(0))+2(2)+2+2(0) 2(2(2+2(0))+2)+2(2(2+2(0)))+2(2(2)+2)+2(2(2)+2(0))+2(2+2(0)) 2(2(2+2(0))+2(2)+2)+2(0)

M i GETTING WRONG ANSWER?

even i am gettin d ans as

yashlondhe @ 28 Oct 2009 08:51 PM

even i am gettin d ans as wrong?? like avinash.. why??

do we have any boundary conditions here/

 

 

I am also getting wrong ans

manish2382 @ 5 Nov 2009 04:10 PM

I am also getting wrong ans like avinash and it looks right to me.

 

i have got the algo right for

siddharth201289 @ 12 Dec 2009 05:13 PM

i have got the algo right for calculating, i guess.But don't know how to write the output....plz help.

Hello Admins, I have checked

vikaasgoel.007 @ 3 Feb 2010 02:55 AM

Hello Admins,

I have checked my code several times, but still can't find the error. Please look at the solution and tell the mistake:

137=2(2(2)+2+2(0))+2(2+2(0))+2(0)

1315=2(2(2+2(0))+2)+2(2(2+2(0)))+2(2(2)+2(0))+2+2(0)

73=2(2(2)+2)+2(2+2(0))+2(0)

136=2(2(2)+2+2(0))+2(2+2(0))

255=2(2(2)+2+2(0))+2(2(2)+2)+2(2(2)+2(0))+2(2(2))+2(2+2(0))+2(2)+2(2(0))+2(0)

1384=2(2(2(2))+2)+2(2(2(2)))+2(2(2)+2)+2(2(2)+2(0))+2(2+2(0))

16385=2(2(2(2))+2(2)+2)+2(0)

Your last three are all

triplem @ 3 Feb 2010 03:16 AM

Your last three are all incorrect. Compare their formats to the first 4 and the mistakes should be obvious.

printf("137=2(2(2)+2+2(0))+2(

CodePro24 @ 14 Feb 2010 08:29 PM
printf("137=2(2(2)+2+2(0))+2(2+2(0))+2(0)");
printf("1315=2(2(2+2(0))+2)+2(2(2+2(0)))+2(2(2)+2(0))+2+2(0)");

i wanted to do this by hand,

f03nix @ 22 Mar 2010 09:15 AM

i wanted to do this by hand, i almost made it but an accidental typo (which i didn't notice) caused a WA. I finally wrote a program for it, checked my result ... and found the err.

 

Since i already had written a program, i also posted a C#2 solution for it.

i hv written the code for

mygaurav @ 16 Apr 2010 10:50 PM

i hv written the code for this question in C

i TRIED IT USING THE SYNTAX of c# (from internet and knowledge of JAVA) but failed

Solution is not accepted bcoz it is too long(500 bytes)

PLz help

can i post it here for clarification-pls suggest

You should be running your

triplem @ 17 Apr 2010 03:24 AM

You should be running your program, then submitting your output as text, not as a program.

Whats the problem with

prajata @ 7 Jun 2010 03:22 PM

Whats the problem with these?

*snip*

One of them is just plain

triplem @ 7 Jun 2010 04:00 PM

One of them is just plain wrong. Check them again.

hey how they are genarated i

mmanoj001 @ 13 Jul 2010 08:53 PM

hey how they are genarated

i cant find the solution

what is logic

Hello freinds anyone can help

milanshah @ 22 Jul 2010 01:42 PM

Hello freinds anyone can help me

what exactly the concept is ?????????

What kind of series is this?

mohd_amer @ 26 Jul 2010 10:17 AM

What kind of series is this? In the given example, how come right hand side is equal to the left hand side?

Well I think source code should be provided for this. And those hints, recurssion, binary didn't helped me. :(

hi admin, i got the logic.

spgokul @ 2 Aug 2010 05:51 PM

hi admin,

i got the logic. but, on submitting, it is always saying that "wrong answer". is anything wrong in my answer ? can you please tell me , whether my answer is correct or not ? should i submit answer in other formats ?

137=2(2(2)+2+2(0))+2(2+2(0))+2(0)
1315=2(2+2(2+2(0)))+2(2(2+2(0)))+2(2(2)+2(0))+2+2(0)
73=2(2(2)+2)+2(2+2(0))+2(0)
136=2(2(2)+2+2(0))+2(2+2(0))
255=2(2(2)+2+2(0))+2(2(2)+2)+2(2(2)+2(0))+2(2(2))+2(2+2(0))+2(2)+2(0)
1384=2(2+2(2+2(0)))+2(2(2+2(0)))+2(2(2)+2)+2(2(2)+2(0))+2(2+2(0))
16385=2(2+2(2)+2(2+2(0)))+2(0)

please friends... anyone tell

spgokul @ 2 Aug 2010 06:30 PM

please friends...

anyone tell me whether my answer is correct or not ?

I am a new one for this type

smartsathiya @ 10 Aug 2010 10:07 AM

I am a new one for this type of challenges, so I need some time...plsssss...

Hi admin i get following

coolamit @ 22 Aug 2010 09:04 PM

Hi admin i get following error while submitting my soln in C#2. :(

You can't submit in this language for this problem

Hi, I learnt 'C' long time

sheola @ 29 Aug 2010 05:27 AM

Hi,

I learnt 'C' long time ago. Now that i want to be a professional programmer and in a short time. Which language i should start learning and how long it could take to start my programming profession as a freelancer.

Can any professional programmer reply to this ?

thanks

my answer

codeheadchef @ 26 Oct 2010 01:05 AM

my answer is

137=2(2(2)+2+2(0))+2(2+2(0))+2(0)

1315=2(2(2+2(0))+2)+2(2(2+2(0)))+2(2(2)+2(0))+2+2(0)

73=2(2(2)+2)+2(2+2(0))+2(0)

136=2(2)+2+2(0)+2(2+2(0))

255=2(2(2)+2+2(0))+2(2(2)+2)+2(2(2)+2(0))+2(2(2))+2(2+2(0))

1384=2(2(2+2(0)+2))+2(2(2+2(0)))+2(2(2)+2)+2(2(2)+2(0))+2(2(2))

16385=2(2(2+2(0))+2(2)+2)+2(0)

 

please tell me where i'm wrong

Three of your answers are

triplem @ 26 Oct 2010 05:52 AM

Three of your answers are wrong. Read through what you have written carefully; there are some errors you should be able to spot without even making any calculations.

137=2(2(2)+2+2(0))+2(2+2(0))+

vibhavsingh @ 7 Jan 2011 03:26 AM

137=2(2(2)+2+2(0))+2(2+2(0))+2(0)

1315=2(2(2+2(0))+2)+2(2(2+2(0)))+2(2(2)+2(0))+2+2(0)

73=2(0)+2(2+2(0))+2(2+2(2))

136=2(2(2)+2+2(0))+2(2+2(0))

255=2(2(2)+2+2(0))+2(2+2(2))+2(2(2)+2(0))+2(2(2))+2(2+2(0))+2(2)+2+2(0)

1384=2(2(2+2(0))+2)+2(2(2+2(0)))+2(2(2)+2)+2(2(2)+2(0))+2(2+2(0))

16385=2(2(2+2(0))+2(2)+2)+2(0)

Stephen if u can pllz tell me where i m wrong

i had calculated this output logically

Two of your answers are

triplem @ 7 Jan 2011 05:44 AM

Two of your answers are wrong. One should be very obvious.

Please tell how to submit the

jagadish121288 @ 17 Jun 2011 08:57 PM
Please tell how to submit the code/answer and also in which format the code/ answer to be in.

I can't understand the

abhinavtheneo @ 27 Sep 2011 08:46 PM
I can't understand the problem. can someone help me??

Nice problem for a

pankajb64 @ 27 Oct 2011 10:44 PM
Nice problem for a refreshment. ( I never knew people have problems for refreshments :P )

Favorite post having such an

eswari @ 15 Nov 2011 10:25 AM
Favorite post having such an fantastic and useful informative content.describing good blogging concepts as well as basics that are very much useful in skilled content writing as well. http://www.web-hosting-service.in/

plzz explain this pblm???

archit15 @ 20 Dec 2011 11:14 PM
plzz explain this pblm???

oO lol, I was over

lelouch @ 25 Mar 2012 02:15 AM
oO lol, I was over complicating things.

The slightest hint to this

mtutnid @ 8 Apr 2012 02:34 AM
The slightest hint to this problem would take away the "fun" of solving it. Your problem is that you don't play enough with numbers and you don't try anything, because no one has handed you a way of solving it. This ain't school. Play.

Yeah, very easy...after

ssta @ 11 Apr 2012 02:59 AM
Yeah, very easy...after starting at it for hours and finally "seeing" what was going on Writing the code to generate it was a pain to get right...even if it took way less time than the staring :)

was really very easy...quite

panicker @ 18 May 2012 01:37 AM
was really very easy...quite obvious too..

SUCCESSFUL SUBMISSIONS FOR THIS PROBLEM:

Programming Competition Fetching successful submissions
Directi Go for Gold

HELP

Program should read from standard input and write to standard output. After you submit a solution you can see your results by clicking on the [My Submissions] tab on the problem page. Below are the possible results:

 

  • Accepted Your program ran successfully and gave a correct answer. If there is a score for the problem, this will be displayed in parenthesis next to the checkmark.
  • Time Limit Exceeded Your program was compiled successfully, but it didn't stop before time limit. Try optimizing your approach.
  • Wrong Answer Your program compiled and ran succesfully but the output did not match the expected output.
  • Runtime Error Your code compiled and ran but encountered an error. The most common reasons are using too much memory or dividing by zero. For the specific error codes see the help section.
  • Compilation Error Your code was unable to compile. When you see this icon, click on it for more information.
  • If you are still having problems, see a sample solution here.

CodeChef is a global programming communityCodeChef hosts online programming competitions
CodeChef is a non-commercial competitive programming community
  • About CodeChef
  • About Directi
  • CEO's Corner
  • C-Programming
  • Programming Languages
  • Contact Us
© 2009 Directi Group. All Rights Reserved. CodeChef uses SPOJ © by Sphere Research Labs
In order to report copyright violations of any kind, send in an email to copyright@codechef.com
CodeChef a product of Directi
The time now is:
CodeChef - A Platform for Aspiring Programmers

CodeChef was created as a platform to help programmers make it big in the world of algorithms, computer programming and programming contests. At CodeChef we work hard to revive the geek in you by hosting a programming contest at the start of the month and another smaller programming challenge in the middle of the month. We also aim to have training sessions and discussions related to algorithms, binary search, technicalities like array size and the likes. Apart from providing a platform for programming competitions, CodeChef also has various algorithm tutorials and forum discussions to help those who are new to the world of computer programming.

Practice Section - A Place to hone your 'Computer Programming Skills'

Try your hand at one of our many practice problems and submit your solution in a language of your choice. Our programming contest judge accepts solutions in over 35+ programming languages. Preparing for coding contests were never this much fun! Receive points, and move up through the CodeChef ranks. Use our practice section to better prepare yourself for the multiple programming challenges that take place through-out the month on CodeChef.

Compete - Monthly Programming Contests and Cook-offs

Here is where you can show off your computer programming skills. Take part in our 10 day long monthly coding contest and the shorter format Cook-off coding contest. Put yourself up for recognition and win great prizes. Our programming contests have prizes worth up to Rs.20,000 and $700lots more CodeChef goodies up for grabs.

Discuss

Are you new to computer programming? Do you need help with algorithms? Then be a part of CodeChef's Forums and interact with all our programmers - they love helping out other programmers and sharing their ideas. Have discussions around binary search, array size, branch-and-bound, Dijkstra's algorithm, Encryption algorithm and more by visiting the CodeChef Forums and Wiki section.

CodeChef Community

As part of our Educational initiative, we give institutes the opportunity to associate with CodeChef in the form of Campus Chapters. Hosting online programming competitions is not the only feature on CodeChef. You can also host a coding contest for your institute on CodeChef, organize an algorithm event and be a guest author on our blog.

Go For Gold

The Go for Gold Initiative was launched about a year after CodeChef was incepted, to help prepare Indian students for the ACM ICPC World Finals competition. In the run up to the ACM ICPC competition, the Go for Gold initiative uses CodeChef as a platform to train students for the ACM ICPC competition via multiple warm up contests. As an added incentive the Go for Gold initiative is also offering over Rs.8 lacs to the Indian team that beats the 29th position at the ACM ICPC world finals. Find out more about the Go for Gold and the ACM ICPC competition here.

Domain Name Registration, Web hosting, and Website Design provided by BigRock.com