[Logo] Mendo Judge Discussion Board - Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
sto znaci "base 10"???  XML
Forum Index » Други задачи
Author Message
OP Magic Potato


[Avatar]

Joined: 16/03/2011 21:20:03
Messages: 62
Offline

od UCASO http://ace.delos.com/usacoprob2?a=LsWKcg1bilr&S=palsquare
Palindromes are numbers that read the same forwards as backwards. The number 12321 is a typical palindrome.

Given a number base B (2 <= B <= 20 base 10), print all the integers N (1 <= N <= 300 base 10) such that the square of N is palindromic when expressed in base B; also print the value of that palindromic square. Use the letters 'A', 'B', and so on to represent the digits 10, 11, and so on.

Print both the number and its square in base B.

PROGRAM NAME: palsquare

INPUT FORMAT

A single line with B, the base (specified in base 10).
SAMPLE INPUT (file palsquare.in)

10
OUTPUT FORMAT

Lines with two integers represented in base B[b]. The first integer is the number whose square is palindromic; the second integer is the square itself.
SAMPLE OUTPUT (file palsquare.out)

1 1
2 4
3 9
11 121
22 484
26 676
101 10201
111 12321
121 14641
202 40804
212 44944
264 69696
[Email] [MSN]
MOI



Joined: 07/07/2010 16:31:48
Messages: 447
Offline

base 10 - систем со основа 10 - декаден броен систем

Конкретно, во текстот на задачата пишува дека B ќе биде дадено во декаден броен систем (не бинарен, октален, ...), и дека броевите што ги печатиш треба да бидат, по големина, помеѓу 1 и 300 (гледано во декаден броен систем).

This message was edited 2 times. Last update was at 03/08/2011 18:18:04

bedzo



Joined: 18/01/2011 02:05:03
Messages: 234
Offline

Финтата на задачата ти е да напишеш функција која претвара од декаден во било кој систем
OP Magic Potato


[Avatar]

Joined: 16/03/2011 21:20:03
Messages: 62
Offline

fala, ja resiv zadacata!!! :d
[Email] [MSN]
 
Forum Index » Други задачи
Go to:   
Powered by JForum 2.1.8 © JForum Team