F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Sir Bedavere¡¯s Bogus Division Solutions

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 293    Accepted Submission(s): 150


Problem Description


The wise Sir Bedavere often uses non-standard logic, yet achieves positive results1.Well, it seems he has been at it again, this time with division. He has determined that canceling the common digit of a numerator and denominator produces the correct answer. Of course, Sir Bedavere only tried this on a small sample of three digit numbers. An example of what he did is shown in the following division problem (in which he canceled the common 6):


Your task is to find all three digit number combinations with the following property:

number combinations where removing the rightmost digit from the top number (numerator) and the identical leftmost digit from the bottom number (denominator) leaves the result of the calculation unchanged.

Omit all of the trivial cases ¡ª xxx/xxx = xx/xx (222/222 = 22/22). The solutions are to be shown in increasing order of the top number (the numerator).

Hint
1 Please see the scene "How do you know she's a witch?" or recall the quote "¡­how sheep's bladders may be employed to prevent earthquakes."
 

Input
NONE! There is no input for this problem.
 

Output
Show the bogus division problems one to a line in the format shown below (which gives a sample merely to show the format) ¡ª single spaces separate the non-blank characters.
 

Sample Output
217 / 775 = 21 / 75 249 / 996 = 24 / 96
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-04-26 17:48:52, Gzip enabled