Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using python Yakko, Wakko and Dot, world - famous animaniacs, decided to rest from acting in cartoons, and take a leave to travel a bit.

using python Yakko, Wakko and Dot, world-famous animaniacs, decided to rest from acting in cartoons, and take a leave to travel a bit. Yakko dreamt to
go to Pennsylvania, his Motherland and the Motherland of his ancestors. Wakko thought about Tasmania, its beaches, sun and sea. Dot
chose Transylvania as the most mysterious and unpredictable place.
But to their great regret, the leave turned to be very short, so it will be enough to visit one of the three above named places. That's why
Yakko, as the cleverest, came up with a truly genius idea: let each of the three roll an ordinary six-sided die, and the one with the highest
amount of points will be the winner, and will take the other two to the place of his/her dreams.
Yakko thrown a die and got Y points, Wakko w points. It was Dot's turn. But she didn't hurry. Dot wanted to know for sure what were her
chances to visit Transylvania.
It is known that Yakko and Wakko are true gentlemen, that's why if they have the same amount of points with Dot, they will let Dot win.
Input
The only line of the input file contains two natural numbers y and w- the results of Yakko's and Wakko's die rolls.
Output
Output the required probability in the form of irreducible fraction in format AB, where A- the numerator, and B- the denominator. If
the required probability equals to zero, output 01. If the required probability equals to 1, output 11.
Examples
Note
Dot will go to Transylvania, if she is lucky to roll 4,5 or 6 points.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions