HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Arithmetic > problem:


50521 - Pound to Grams

Guest
• Discussion of problem (2)

Section problems

• 50408 - Molecules
• 50481 - Car Parking
• 50413 - Valid Permutations
• 50412 - K numbers
• 50417 - Fun Fair
• 50433 - Sum of Cubes
• 50807 - Euro to Leke
• 50871 - Harmonic Mean
• 50521 - Pound to Grams
• 50292 - Average of 4 Marks
• 50432 - Numbers and Squares
• 50510 - What floor are they?
• 50870 - ZScore normalization
• 50797 - Nr of Missing Guests
• 50518 - Histogram Equalization
• 50522 - Multiplication Table - 2
• 50814 - Buying Books from Internet

Feedback

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

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question by Ibrahim Mesecan.

Pound to grams

Question:
Write a program that converts a weight given in Stone, Pound and Ounce to Tones, Kgs and grams.

  • 1 Tone is 1000 Kgs
  • 1 Kg is 1000 grams
  • 1 Stone is 14 Pounds
  • 1 Pound is 16 Ounce
  • 1 Ounce is 28.3495 grams

Input specification
You will be given 3 integers: Stone, Pound and Ounce; where 0 ≤ Stone ≤ 100, 0 ≤ Pound ≤ 13, and 0 ≤ Ounce ≤ 15.

Output specification
Show three integers: Tones, kgs, and grams. Round the grams to the nearest integer.

 Sample Input I     Sample Output I   
 5 2 7
 0 32 857
Для отправки решений необходимо выполнить вход.

www.contester.ru