# | Problem | Pass Rate (passed user / total user) |
---|---|---|
12872 | Ruby and Sapphire |
|
13566 | Magic factors |
|
Description
The prices of ruby and sapphire are 5$, 7$ respectively.
The total numbers of rubies and sapphires is N, and the overall value is M$.
How many rubies and how many sapphires are there?
Input
Two integers N, M, where 10,000 ≤ N, M ≤ 10,000
Output
Number of rubies and sapphires.
Note that there is a newline character at the end of the output.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Today, Jessie discover a new way to encode her 4-digit passcode, which is transforming the passcode into 3 integers, and we called it the "magic factors."
For example, the 3 magic factors of a 4-digit passcode "1234," is
1*234 = 234,
12*34 = 408,
123*4 = 492.
Please help Jessie to find the magic factors in the above order.
Hint: Use / and % to obtain the quotient (商數) and the remainder (餘數), respectively.
Input
A single integer represents the 4-digit passcode, each digit is a number from 1 to 9.
Output
Output a single line containing three numbers, the magic factors of the passcode.
Each number is separated by a space.
Please make sure to output the magic factors in the order shown in the description.
Please remember to print "\n" at the end.