HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Array and Matrices > problem:


Raporti Javor

Volume problems

• 50317 - Student Line Up
• 50311 - Student Line Up
• 50398 - Sum of kth Anti-diagonal
• 50323 - Filtering Contact List
• 50364 - Student averages
• 50756 - Average of the Nth Student
• 50758 - National Elections - Revisited
• 50458 - Weekly Report
• Raporti Javor
• 50555 - Frequency of Letters
• 50592 - Matrix Multiplication
• 50653 - Long Divide
• 50767 - Censor
• 50792 - The student with the highest...
• 060. 50389 - Reverse an Array
• 100. 50330 - Find the average of n ...
• 110. 50359 - Mode of a Series

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 10000/10000/10000/10000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question.

Raporti Javor

Mr. Alban Mataj ka nje supermarket. Sa here qe nje produkt shitet, numri i sasise ulet ne databaze. Here pas here, per te pare balancen, ai numeron produktet ne supermarket dhe pergatit raportin.

Pyetja:
Shkruaj nje program qe merr numrin e produkteve per kete jave ndjekur nga cmimi i atij produkti. Me pas ai merr numrin e produkteve nga java e kaluar. Programi llogarit numrin e produkteve te shitura dhe totalin e lekeve qe u fituan ate jave.
Note:

Inputi
Do jepet nje numer (n) integer ne fillim ku 1 ≤ n ≤ 40000. Me pas njeri pas tjetrit do te jepen 2 numra:

  • numri i produkteve kete jave(integer)
  • cmimi i produktit(floating point number)
N rrjeshta pasardhese do jepen numri i produkteve nga java e kaluar.

Outputi
Afisho dy numra (nje integer dhe nje floating point number):

  • numri total i shitjeve kete jave
  • totali i fitimit per kete jave

Note: Afisho fitimin me 2 shifra pas presjes. Perdor: print(nrIshitjeve, "{:.2f}".format(fitimi))
Gjithashtu kini parasysh qe input do merret rrjesht pas rrjeshtit. Pra nuk ka nevoje te perdornin input.split(). Thjesht input()

 Sample Input I   
  4
  5 2.2
  10 2
  9 1.2
  4 3
  10
  12
  15
  6
 Sample Input II   
  5
  19 2.8
  20 1.1
  10 1.9
  15 0.4
  19 2.1
  26
  26
  16
  23
  23
 Sample Output I   
  15 28.2
 Sample Output II   
  31 49.2

Shpjegimi (Sample 1) : Jane 4 produkte

Item IDJava kaluar Java aktuale Cmimi ShitjetTotali
110 52.2 511
212 102 24
315 91.2 67.2
46 43 26
Для отправки решений необходимо выполнить вход.

www.contester.ru