Problem Description:
Given the following recursive function:
The floor function is the function that takes as input a real number X , and gives as output the greatest integer less than or equal to X denoted floor(X) or ⌊X⌋.
Floor example
x |
Floor |
2 |
2 |
2.4 |
2 |
2.9 |
2 |
-2.7 |
-3 |
-2 |
-2 |
問題描述:
給定下列遞迴函式 :
取整函數是一類將實數對映到相近的整數的函數。常用的取整函數有兩個,分別是下取整函數和上取整函數。
下取整函數即為取底符號,在數學中一般記作⌊⌋或 在電腦科學中一般記作floor(x),表示不超過x的整數中最大的一個。
Floor 範例
x |
Floor |
2 |
2 |
2.4 |
2 |
2.9 |
2 |
-2.7 |
-3 |
-2 |
-2 |
Please calculate f (k).
請計算出 f (k) 。
Input:
The input value is an integer greater than 1.
輸入說明:
輸入值為一個大於 1 的整數。
Output description:
The calculation result of f(k).
輸出說明:
f(k) 的計算結果。
10 12
60 94
編號 | 身分 | 題目 | 主題 | 人氣 | 發表日期 |
沒有發現任何「解題報告」 |