|
|
back to boardIf you get WA 2 My program worked correctly on N in 1 to 9, and incorrectly on numbers greater than 9 (error in string concatenation). I kept getting an error on test 2 until I fixed the error. Apparently, in test 2, the input is a number greater than 10. Try this test: in: 11 out: ((((((((((sin(1)+11)sin(1-sin(2))+10)sin(1-sin(2+sin(3)))+9)sin(1-sin(2+sin(3-sin(4))))+8)sin(1-sin(2+sin(3-sin(4+sin(5)))))+7)sin(1-sin(2+sin(3-sin(4+sin(5-sin(6))))))+6)sin(1-sin(2+sin(3-sin(4+sin(5-sin(6+sin(7)))))))+5)sin(1-sin(2+sin(3-sin(4+sin(5-sin(6+sin(7-sin(8))))))))+4)sin(1-sin(2+sin(3-sin(4+sin(5-sin(6+sin(7-sin(8+sin(9)))))))))+3)sin(1-sin(2+sin(3-sin(4+sin(5-sin(6+sin(7-sin(8+sin(9-sin(10))))))))))+2)sin(1-sin(2+sin(3-sin(4+sin(5-sin(6+sin(7-sin(8+sin(9-sin(10+sin(11)))))))))))+1 |
|
|