300655: CF125A. Measuring Lengths in Baden

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Measuring Lengths in Baden

题意翻译

``` 在巴登,一英寸等于 3 厘米,一英尺等于 12 英寸 你有一个物品,长度为 n 厘米。任务是将厘米改成以英尺和英寸为单位的长度。 结果是一个整数,如果是一个小数那么答案要四舍五入 请注意,取近似值时,1 厘米舍入到 0 英寸,2 厘米舍入到 1 英寸。 输入:一个非负整数 n 输出:两个整数,分别是保留整数部分的英尺数和英寸数,中间用空格隔开 ```

题目描述

Lengths are measures in Baden in inches and feet. To a length from centimeters it is enough to know that an inch equals three centimeters in Baden and one foot contains 12 inches. You are given a length equal to $ n $ centimeters. Your task is to convert it to feet and inches so that the number of feet was maximum. The result should be an integer rounded to the closest value containing an integral number of inches. Note that when you round up, 1 cm rounds up to 0 inches and 2 cm round up to 1 inch.

输入输出格式

输入格式


The only line contains an integer $ n $ ( $ 1<=n<=10000 $ ).

输出格式


Print two non-negative space-separated integers $ a $ and $ b $ , where $ a $ is the numbers of feet and $ b $ is the number of inches.

输入输出样例

输入样例 #1

42

输出样例 #1

1 2

输入样例 #2

5

输出样例 #2

0 2

Input

题意翻译

``` 在巴登,一英寸等于 3 厘米,一英尺等于 12 英寸 你有一个物品,长度为 n 厘米。任务是将厘米改成以英尺和英寸为单位的长度。 结果是一个整数,如果是一个小数那么答案要四舍五入 请注意,取近似值时,1 厘米舍入到 0 英寸,2 厘米舍入到 1 英寸。 输入:一个非负整数 n 输出:两个整数,分别是保留整数部分的英尺数和英寸数,中间用空格隔开 ```

加入题单

算法标签: