URAL 1243. Divorce of the Seven dwarfs

Source: Internet
Author: User

1243. Divorce of the Seven dwarfs
Time limit:1.0 Second
Memory limit:64 MB
After the Snow white with her bridegroom had left the house of the Seven Dwarfs, their peaceful and prosperous life have co Me to an end. Each dwarf blames others to being the reason of the Snow white ' s leave. To stop everlasting quarrels, the dwarfs decided to part. According to a ancient law, their common possessions should is divided in the most fair the, which means it all the DWA RFS should get equal parts. Everything that the dwarfs cannot divide in a fair the it they give to the Snow white. For example, after dividing-boots, each dwarf got 3 old boots, and the Snow White got the remaining 5 old boots. Some of the numbers is very large, for example, the dwarfs has 123456123456 poppy seeds, so it's isn't easy to calculate That's the Snow white gets only one seed. The divorce, help the dwarfs to determine quickly the Snow White's part.InputThe only line contains a integer N that represents the number of similar items and the Dwarfs want to divide (1≤n≤ 10 50).OutputYou should output the number of items to the possession of the Snow white.Sample

input Output
123456123456
1




Test instructions: Calculates n% 7.

Parse: Because n is large, use Python.



AC Code:

Print input ()%7



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.