Предмет: Информатика, автор: vipsarur

Помогите с задачей по информатике прошу вас. Срочно. На паскале или на C++. Желательно все-таки на паскале
Ограничение времени 1 секунда
Ограничение памяти 64Mb
Ввод стандартный ввод или input.txt
Вывод стандартный вывод или output.txt

Даны два числа A и B (0<=A,B<=100000). Напишите программу нахождения произведения числа А на все цифры числа В. Входной файл input.txt содержит два числа A и B. В выходной файл output.txt вывести одно число – произведение числа А на все цифры числа В.

Ввод 3 33
Вывод 27

Ответы

Автор ответа: danulpopov
0
var
a,b:int64;
Begin
Read(a, b);
 if b = 0 then Writeln(0)
  else begin
    While b > 0 do begin
      a:= a * (b mod 10);
      b:= b div 10;
    end;
Writeln(a);
end;
end.

Автор ответа: Аноним
0
Июо как для набора 3 0 Ваша программа возвращает... 3 - еще одна ошибка.
Автор ответа: Аноним
0
*Ибо
Автор ответа: Аноним
0
... и после внесения двух исправлений наши программы стали близнецами)))
Автор ответа: danulpopov
0
После такого стресса хочется пойти и выпить пару кружек чаю, сегодня ошибка на ошибке, просто шок....
Автор ответа: Аноним
0
Вот для этого и существуют компьютерные игры! ))))
Похожие вопросы
Предмет: Химия, автор: fylypchukolda
Предмет: Английский язык, автор: mamonovanastya630
4

Установите соответствие между текстами и их темами, выбрав тему из списка. Используйте каждую тему только один раз. В задании одна тема лишняя.

This text deals with a person whose hobby is...

1) watching TV.

2) astronomy.

3) cleaning the room.

4) travelling.

5) dreaming.

6) sports.

Children's rooms and hobbies

A) I've never been to Brazil but I'd like to go there when I'm older. I think this helped me to decorate my room. I decided to turn it into a rain forest. So far, I've painted trees, tigers and monkeys across the walls. My friends think my room is quite cool but others think it's strange. But I'm proud of it. It's my dream room 1 - l wouldn't change anything about it.

B) I spend a lot of time in my room and do whatever I like to do there. It's a quiet, good place, because I don't share it with anybody. There are photos, pictures and souvenirs I've collected from my travels to Africa. These things mean a lot to me but not much to anyone else. I don't care!

C) There are dirty clothes, coffee cups, books and papers on the floor of my room. It doesn't look clean and tidy. I hate washing and cleaning it. My mother always does it for me because she hates all this mess. She saves my time, which I can spend on cable TV. And what can be better than an interesting TV program?

D) Football is an important part of my life, and I spend most of my time playing or watching it. I've put up photos and posters of my favorite players all over the walls. I sometimes think it's a bit too much, but I really like my room - except the days when our team loses the game.

18

E) My room is at the top of the house, and I get a really good view of the sky from the window. I've set up my telescope there, so I can study the stars whenever I want. I find looking at the stars much more interesting than watching TV with my parents, so I spend a lot of time in the evening up there. It's really peaceful and relaxing. I think my room is a great place to rest after school.б