ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1233. Amusing Numbers

Good problem! (-)
Posted by Dmitry 'Diman_YES' Kovalioff 28 Feb 2003 10:49
Re: Good problem! (-)
Posted by Dinh Hong Minh 28 Feb 2003 11:01

 I agree with you !
Can you post the task description.
Posted by I am david. Tabo. 28 Feb 2003 13:19
>
>  I agree with you !
>
I got about 5WA on it. i check all test that was on contests-tests.rar but again it says WA:(
Posted by Locomotive 28 Feb 2003 16:10
Here is my code
mail me aidin_n7@hotmail.com
Const
  B                   : Array[0..20] of double =
                        ((1),(10),(100),(1000),(10000),(100000),
                         (1000000),(10000000),(100000000),
(1000000000),
                         (10000000000.0),
                         (100000000000.0),
                         (1000000000000.0),
                         (10000000000000.0),
                         (100000000000000.0),
                         (1000000000000000.0),
                         (10000000000000000.0),
                         (100000000000000000.0),
                         (1000000000000000000.0),
                         (10000000000000000000.0),
                         (100000000000000000000.0));
Var
  M,K                 : Longint;
  P,Y                 : comp;
  I,L                 : byte;
  Flag                : Boolean;

Begin
  Readln(k,m);
  L:=0;
  repeat Inc(L);
  Until B[L]>K;
  P:=0;
  Y:=K-B[L-1];
  For i:=1 to L do
    P:=P+(trunc(Y) div Trunc(B[L-I]))+1;

  If M<p then
    Writeln(0)
  Else
    If M=P then
      Writeln(K)
    Else
    Begin
       IF Y<B[L-1] then
      begin
        Dec(L);
        flag:=False;
      end
      else
        flag:=True;
      If Y=0 Then
      Begin
        Writeln(0);
        Exit
      End;
      Repeat
        M:=M-Trunc(P);
        Y:=Y*10; Inc(L);
        P:=y;
      Until M<=p;
      Writeln(B[L-ord(Flag)]+M-1:0:0);
    End;
End.
How to submit that problem? In problemset last problem is 1232 (Asteroid Landing)? when I try to submit something after 1232 I am reported that that problem does not exist :(
Posted by Oberon (Yura Znovyak) 28 Feb 2003 16:30
>
You should just click "Submit Problem" and fill the filed "Problem" as 1233 (or 1234, ..., 1241) (-)
Posted by Dmitry 'Diman_YES' Kovalioff 28 Feb 2003 16:41
> >
Thanks! Where can I get problems themself?
Posted by Oberon (Yura Znovyak) 28 Feb 2003 16:48
> > >
Check your mail :) (-)
Posted by Dmitry 'Diman_YES' Kovalioff 28 Feb 2003 16:50
http://neerc.ifmo.ru/Regional/problems/index.htm (-)
Posted by Dmitry 'Diman_YES' Kovalioff 28 Feb 2003 16:52
http://neerc.ifmo.ru/Regional/problems/amusing.htm (-)
Posted by Dmitry 'Diman_YES' Kovalioff 28 Feb 2003 16:53