HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Beginners > problem:


028. 50521 - Pound to Grams

Guest
• Discussion of problem (2)

Volume problems

• 003. 50349 - Area of a Triangle
• 004. 50350 - Fahrenheit to Celsius
• 005. 50797 - Nr of Missing Guests
• 007. 50280 - Division
• 010. 50357 - Convert Euros into Dol...
• 015. 50356 - Hours Passed
• 020. 50351 - Convert inches to cm
• 025. 50294 - Centimeters to Yards
• 028. 50521 - Pound to Grams
• 030. 50341 - Separate Into Digits
• 034. 50502 - Welcome Andi - 1
• 040. 50879 - Passed or Failed
• 040. Problem 1
• 042. 50798 - Passing the course
• 045. 50391 - Cinema Tickets
• 048. 50403 - Number of Chairs
• 050. 50568 - Body Mass Index Calc...

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