Parenthetical brainteaser

  • 6
  • Locked
It turns out that we have some code that doesn't do what we need it to. It also turns out that you have to fix this now. To get the correct result, you need to play around with parentheses: arrange them so that the desired number (382) appears on the screen.
You can't complete this task, because you're not signed in.
Comments (57)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Anonymous #11304245
Level 3 , Taiwan, Province of China
4 March, 05:38
it's so boring about math
sugiharto Singodimejo
Level 8 , Jakarta, Indonesia
11 February, 23:54
(3 (5 7))
Michaela Obertova
Level 29 , Prievidza
5 October 2022, 08:33
Took me a while to resolve as I first tried just playing around, but while playing around I realized that you have to look into divisors and it was almost easy after that. Though the task could it make clearer that the two sets of parentheses are extra two to the System.out.println parentheses.
Level 8 , Singapore, Singapore
15 June 2021, 16:32
took a while to identify the logic. Thanks for the hints given below.
Level 5 , Brisbane, Australia
5 April 2021, 08:57
I was looking for 2 opening and 2 closing parentheses. Never would have got it because the answer is different. Maybe I interpreted it wrong.
Level 5 , Pune, India
3 January 2021, 05:39
Completed in first attempt! Took me about 5 mins to figure out the solution. Putting parenthesis was quite easy. More of a math puzzle than coding problem!
Level 3 , San Antonio, United States
16 October 2020, 16:44
Hint = 2 * 191
Alhoussein Camara
Level 7 , United States of America
3 August 2021, 03:59
thanks for the hint
Level 18 , Sofia, Bulgaria
6 October 2020, 16:18
it took me 2 days of trying with no thinking, 2 days of not thinking at all about the problem and ... 10 minutes of thinking hard about the problem and couple of tests...It's really that important when you feel stuck to stop thinking about the problem for a while and when you come back with a fresh mind you can achieve everything!!! Pro Java Dev I will take you down!!!
Level 4 , Limerick, Ireland
3 August 2020, 15:16
It took me 65 attempts to solve. Hint: 3 parenthesis to be used in total including printing method's. Hint: Num 2 in the beginning will multiply with rest of the numbers. Best of luck!
Level 13 , Den Haag, Netherlands
27 July 2020, 13:20
it took me hours more than needed because i thouhgt that there should be 2 opening parenthesis at the beginning and 2 at the end however they mean that you should have 4 parenthesis in total without counting the parenthesis van the println(). good luck with solving it and make sure that you interpreted it the right way otherwise it wil take hours.