125A.md (994B)
1 Source: https://codeforces.com/problemset/problem/125/A 2 3 A. Measuring Lengths in Baden 4 5 time limit per test 6 7 2 seconds 8 9 memory limit per test 10 11 256 megabytes 12 13 input 14 15 stdin 16 17 output 18 19 stdout 20 21 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. 22 23 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. 24 25 Note that when you round up, 1 cm rounds up to 0 inches and 2 cm round up to 1 inch. 26 27 Input 28 29 The only line contains an integer *n* (1 ≤ *n* ≤ 10000). 30 31 Output 32 33 Print two non-negative space-separated integers *a* and *b*, where *a* is the numbers of feet and *b* is the number of inches. 34 35 Examples 36 37 Input 38 39 ``` 40 42 41 ``` 42 43 Output 44 45 ``` 46 1 2 47 ``` 48 49 Input 50 51 ``` 52 5 53 ``` 54 55 Output 56 57 ``` 58 0 2 59 ```