Loading...
MilenaAdzhemova avatar MilenaAdzhemova 50 Точки

Долу в ляво на монитора ми се появява zip файл.Трябва да се отвори.Ако си отворил доста такива zip файла може просто да не се вижда.

0
stomper89 avatar stomper89 1 Точки

Zip файла го отварям, но като влезна във zip-a  не ми отваря Word документа, изписва ми някаква грешка. Затова се чудя дали и при други дава грешка. Грешка има в само в задача 1 и 3 .Другите се отварят без проблеми.

0
MilenaAdzhemova avatar MilenaAdzhemova 50 Точки

При мен всичо е ок!

Problem 1 – Hungry Garfield

You know that Garfield is a very lazy cartoon cat that is always hungry and, just like you and me, likes Italian food very much. His favorite dishes are pizza, lasagna and sandwiches. John is a talented cartoonist and sometimes he goes on a business trip here and there and Garfield has to stay home alone and take care of himself. Every time John is away for a long time he gives Garfield some money to make sure he is well fed. Garfield is a very smart cat, he can talk, he can buy pizza himself, but he doesn’t care about calculations, because cats don’t care about anything else but food and a good nap. He asks you to make a simple program that calculates whether the money John gave him would be enough to eat all the pizzas, lasagnas and sandwiches he wants.

You are given the sum of money (in dollars) that John gives the prices of pizza, lasagna and sandwiches in leva. Then you will be given the quantity of pizza, lasagna and sandwiches he would like to eat in order to be well fed. You have to convert all the money to dollars. If the money he wants to spend is equal or less than the money John gave him, he will be satisfied, otherwise he will be hungry and angry at John.

Input

The input data should be read from the console.

  • On the first line you will receive money - the money John gave to Garfield in dollars.
  • On the second line you will receive the dollar exchange rate.
  • On the third line will receive pizzaPrice - the price of pizza in leva.
  • On the fourth line you will receive lasagnaPrice - the price of lasagna in leva.
  • On the fifth line you will receive sandwichPrice - the price of sandwiches in leva.
  • On the sixth line you will receive the pizzaQuantity – the quantity of pizza Garfield wants to eat.
  • On the seventh line you will receive the lasagnaQuantity – the quantity of lasagna Garfield wants to eat.
  • On the eighth line you will receive the sandwichQuantity – the quantity of sandwiches Garfield wants to eat.

The input data will always be valid and in the format described. There is no need to check it explicitly.

Output

The output data should be printed on the console.

If the money John gave Garfield is more or equal to buy all the food he wants, print:

Garfield is well fed, John is awesome. Money left: ${the money that has left}.

If the money John gave Garfield is not enough, print:

Garfield is hungry. John is a badass. Money needed: ${the money that is needed}.

Money should be always positive and formatted with two digits after the decimal point.

Constraints

·         The money John gave and the dollar rate will be a floating point number in the range [1 - 232].

·         The prices of pizza, lasagna and sandwiches will be floating point numbers in the range [0 - 232].

·         The quantity of pizza, lasagna and sandwiches will be integers in the range [0 - 232].

·         Allowed working time for your program: 0.1 seconds.

·         Allowed memory: 16 MB.

Examples

Input

Comments

Output

50

1.55

5

4

3

5

5

1

The money Garfiel needs is

5/1.55 * 5 + 4/1.55 * 5 + 3/1.55 *1 =  30.97.

30.97 is less than 50, so the money John gave him is enough.

Garfield is well fed, John is awesome. Money left: $19.03.

 

Input

Output

100

1.55

10

15

3

5

8

2

Garfield is hungry. John is a badass. Money needed: $13.55.

 

0
MilenaAdzhemova avatar MilenaAdzhemova 50 Точки

Problem 3 – Fallen In Love

Ivancho is a student in high school. One of his classmates is his best friend Mariyka. They have known each other since they were born and it was when they were in first grade that Ivancho realized he was in love with Mariyka. Now that he is already a grown up man, he decides he can hide his feelings no more. Mariyka’s birthday is coming and Ivancho wants to impress her. He knows that recently Mariyka has started a Programming Basics course in SoftUni, so he decides to surprise her with a “virtual present”. He asked you as Mariyka’s classmate in SoftUni to write him a program, which prints a flower on the console.

Input

The input data should be read from the console.

  • On the only input line you will be given the number N.

The input data will always be valid and in the format described. There is no need to check it explicitly.

Output

  • The output should be printed on the console. Use the “#” (number sign) for the flower and “~” sign for the leaves, and “.” dot for background. Follow the examples below.

Constraints

  • N will always be a positive number in the range [1 … 18].
  • Allowed working time for your program: 0.1 seconds. Allowed memory: 16 MB.

Examples

Input

Output

Input

Output

5

##..........##..........##

#~#........#..#........#~#

#~~#......#....#......#~~#

#~~~#....#......#....#~~~#

#~~~~#..#........#..#~~~~#

.#~~~~~#..........#~~~~~#.

...#~~~~#........#~~~~#...

.....#~~~#......#~~~#.....

.......#~~#....#~~#.......

.........#~#..#~#.........

...........####...........

............##............

............##............

............##............

............##............

............##............

3

##......##......##

#~#....#..#....#~#

#~~#..#....#..#~~#

.#~~~#......#~~~#.

...#~~#....#~~#...

.....#~#..#~#.....

.......####.......

........##........

........##........

........##........

 

 

 

0
MilenaAdzhemova avatar MilenaAdzhemova 50 Точки

Копирай ги!

Не зная дали е позволено да пишем толкова дълъг текст.

0
Можем ли да използваме бисквитки?
Ние използваме бисквитки и подобни технологии, за да предоставим нашите услуги. Можете да се съгласите с всички или част от тях.
Назад
Функционални
Използваме бисквитки и подобни технологии, за да предоставим нашите услуги. Използваме „сесийни“ бисквитки, за да Ви идентифицираме временно. Те се пазят само по време на активната употреба на услугите ни. След излизане от приложението, затваряне на браузъра или мобилното устройство, данните се трият. Използваме бисквитки, за да предоставим опцията „Запомни Ме“, която Ви позволява да използвате нашите услуги без да предоставяте потребителско име и парола. Допълнително е възможно да използваме бисквитки за да съхраняваме различни малки настройки, като избор на езика, позиции на менюта и персонализирано съдържание. Използваме бисквитки и за измерване на маркетинговите ни усилия.
Рекламни
Използваме бисквитки, за да измерваме маркетинг ефективността ни, броене на посещения, както и за проследяването дали дадено електронно писмо е било отворено.