its like this











*Problem Statement:*
Asif and Nafisa are very interested in solving puzzles.They always try to
give one another puzzles to see who is the best.So ,as usual, one day,
Nafisa gave Asif a matrix.The matrix is as follows :----

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z A B C ......
B C D E F G H I J K L M N O P Q R S T U V W X Y Z A B C D ......
C D E F G H I J K L M N O P Q R S T U V W X Y Z A B C D E ......
D E F G H I J K L M N O P Q R S T U V W X Y Z A B C D E F ......
.
.
.


Assume that the matrix is very huge(both row and column wise). Nafisa
describes a special sequence as a sequence whose first term is 'A'[element
at (0,0)], second term is 'B'[element at (0,1)],third term is 'B'[element at
(1,0)],fourth term is 'C'[element at (2,0)]. Now,she asks Asif to find the
nth term of this special sequence. Help Asif To solve the problem.


*Input:*
There will be multiple test cases with number N(1<=N<=1000000) per line.
 *Output:*
A character ['A'-'Z'] per line for each number N representing the Nth number
in the special sequence.

*Sample Input *

*3
6
10
*

*
Sample Output *

*TERM 3 IS B
TERM 6 IS C
TERM 10 IS D
*



On Thu, Oct 1, 2009 at 11:39 PM, kumaran arumugam <[email protected]> wrote:

> No...
> its a local coding problem...
>
>
> On Thu, Oct 1, 2009 at 11:37 PM, Lev Neiman <[email protected]>wrote:
>
>> are you referring to acm problems?
>> Sincerely,
>>    Lev A. Neiman.
>>
>>
>>
>> On Thu, Oct 1, 2009 at 2:06 PM, kumaran arumugam <[email protected]>wrote:
>>
>>> I tried d same..
>>> But the practice judge says that time limit is exceeded.......
>>>
>>>
>>> On Thu, Oct 1, 2009 at 11:13 PM, kumaran arumugam <[email protected]>wrote:
>>>
>>>> Thank you...
>>>>
>>>>
>>>> On 10/1/09, Lev Neiman <[email protected]> wrote:
>>>> > while( !cin.eof() )
>>>> > {
>>>> >     // process cases.
>>>> >
>>>> > }
>>>> > Sincerely,
>>>> >    Lev A. Neiman.
>>>> >
>>>> >
>>>> > On Thu, Oct 1, 2009 at 12:31 PM, kumaran arumugam <[email protected]>
>>>> wrote:
>>>> >
>>>> >>
>>>> >> Ya i have the option to take 1 case...
>>>> >> n hw to use the eof approach..can u give an example please?
>>>> >>
>>>> >>
>>>> >> On 10/1/09, Mikhail Dektyarev <[email protected]>
>>>> wrote:
>>>> >> > If you have a way to read one and only one case - you'll simple
>>>> read
>>>> >> tests
>>>> >> > until the end of file.If no - there is no way to do it.
>>>> >> >
>>>> >> > On Thu, Oct 1, 2009 at 7:58 PM, kumaran arumugam <
>>>> [email protected]>
>>>> >> wrote:
>>>> >> >
>>>> >> >>
>>>> >> >> Hw to accept multiple test cases as input when the number of test
>>>> >> >> cases is not known..?
>>>> >> >>
>>>> >> >> >
>>>> >> >>
>>>> >> >
>>>> >> >
>>>> >> > --
>>>> >> > Best regards, Дектярев Михаил
>>>> >> >
>>>> >> > >
>>>> >> >
>>>> >>
>>>> >> >
>>>> >>
>>>> >
>>>> > >
>>>> >
>>>>
>>>
>>>
>>>
>>>
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-codejam" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to