35 points
We need to get some things calculated, so let's get to work.
Hit the problem endpoint and grab the image URL. The image will be a few lines of numbers and operations that you need to perform. Start with 0
, go from top to bottom and figure out the final result. Careful! The numbers may get big. Make sure nothing overflows along the way.
To illustrate, an image roughly equivalent to:
+ 12
- 10
× 2
Should be treated as (((0 + 12) - 10) × 2)
which equals 4
.
A word on division: for ÷
, the challenge uses floor division which may be slightly surprising. Floor division means that after dividing the numbers, the result is rounded down. This means that -10 ÷ 3
is equal -4
(the floor
of -3.(3)
is -4
)! Keep this quirk in mind.
Submit the final result the the solution endpoint. It's done!
GET /challenges/visual_basic_math/problem?access_token=...
Problem JSON:
image_url
: the URL of the image we want you to process
POST /challenges/visual_basic_math/solve?access_token=...
Solution JSON structure:
result
: the result of all the math It's always interesting to make a computer really read things.
h^
by buying me a coffee. Cheers!h^
profile is here.