ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1233. Amusing Numbers

Good problem! (-)
Послано Dmitry 'Diman_YES' Kovalioff 28 фев 2003 10:49
Re: Good problem! (-)
Послано Dinh Hong Minh 28 фев 2003 11:01

 I agree with you !
Can you post the task description.
Послано I am david. Tabo. 28 фев 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:(
Послано Locomotive 28 фев 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 :(
Послано Oberon (Yura Znovyak) 28 фев 2003 16:30
>
You should just click "Submit Problem" and fill the filed "Problem" as 1233 (or 1234, ..., 1241) (-)
Послано Dmitry 'Diman_YES' Kovalioff 28 фев 2003 16:41
> >
Thanks! Where can I get problems themself?
Послано Oberon (Yura Znovyak) 28 фев 2003 16:48
> > >
Check your mail :) (-)
Послано Dmitry 'Diman_YES' Kovalioff 28 фев 2003 16:50
http://neerc.ifmo.ru/Regional/problems/index.htm (-)
Послано Dmitry 'Diman_YES' Kovalioff 28 фев 2003 16:52
http://neerc.ifmo.ru/Regional/problems/amusing.htm (-)
Послано Dmitry 'Diman_YES' Kovalioff 28 фев 2003 16:53