หัวข้อ: (XY , D)- Circular Number
ดูหนึ่งข้อความ
  #5  
Old 25 กรกฎาคม 2002, 17:46
ToT's Avatar
ToT ToT ไม่อยู่ในระบบ
จอมยุทธ์หน้าหยก
 
วันที่สมัครสมาชิก: 13 สิงหาคม 2001
ข้อความ: 154
ToT is on a distinguished road
Post

; ขอบคุณมากครับ
ตอบคุณ xbox
โจทย์ให้เขียนโปรแกรมหา Circular ของ (XY,D ) ที่น้อยที่สุดอ่ะคับ
อ้างอิง:
Problem 3 : (XY , D)- Circular Numbers

An (XY,D)-Circular Number is a number whose last two digits are X and Y, where the multiplication of the number by the single digit D is equivalent to moving the last two digits (XY) to the beginnig of the number.

For example, the number :

132832080200501253 is a (5 3, 4)- Circular number because
132832080200501253 * 4 = 531328320802005012

Write a program that asks for a two-digit number XY and a single digit D, and prints the SMALLEST (XY,D) - Circular number or prints a message "NONE" if none exists.

Test your program with (1 2, 4) and (9 9, 9).
__________________
Mmmm ....
ตอบพร้อมอ้างอิงข้อความนี้