CF125A.Measuring Lengths in Baden

普及/提高-

通过率:0%

时间限制:2.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

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.

在巴登地区,长度单位使用英寸和英尺。将厘米转换为这些单位时,只需知道:在巴登,1 英寸等于 3 厘米,且 1 英尺包含 12 英寸。

给定一个长度为 $ n $ 厘米的值。你的任务是将其转换为英尺和英寸,使得英尺数尽可能大。结果应为四舍五入到最接近的整数值(以英寸为单位)。

注意:当进行四舍五入时,1 厘米四舍五入为 0 英寸,2 厘米四舍五入为 1 英寸。

输入格式

The only line contains an integer n (1 ≤ n ≤ 10000).

唯一一行包含一个整数 nn(1≤n≤100001 \leq n \leq 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.

输出两个非负的、以空格分隔的整数 aa 和 bb,其中 aa 表示英尺数,bb 表示英寸数。

输入输出样例

  • 输入#1

    42

    输出#1

    1 2
  • 输入#2

    5

    输出#2

    0 2

输入解题思路,AI测评打分。不知道怎么写?

首页