Git Product home page Git Product logo

donkey's Introduction

donkey

One day, a donkey belonging to the desert went to the football stadium and because he was a donkey, he went into the field instead of the stands. Then he became excited when he saw the grass and seeing thousands of people around him made him doubly excited; He got the feeling of the concert and decided to sing for them! He didn't know anything about music and rhythm, but in order for his juniper to be rhythmic, he decided to leave a certain distance between his juniper. So he chose one number a and one number b and decided to read like this:

At 0 second, he announces to the people that he is going to sing a requested song for them. Then it waits for a second and in a second it starts the first juniper. Then he waits for b seconds and in second a+b he starts the second juniper. Then it waits again for a second and it beeps in 2 x a+b seconds. Then waits for b seconds and...

From the beginning, he had made a deal with himself not to sneeze more than l times. (His larynx can't take more than that) Now he has sung l times and it is a question for him how many seconds passed from the time he announced to the people that he was going to sing for them until now when he sang the last song. He is a donkey and he wants you to answer his question.

input

a,b,l

output

print the last time to heehaw .

donkey's People

Contributors

alisaberi1 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.