Q356:Square Pegs And Round Holes
在一個邊長為2n的正方形棋盤中央畫一個直徑為2n-1的圓,以下的圖為n=3
![]() |
Input
輸入包含好幾行測試資料,每行有一個正整數n(n<=150)
Output
對每一行輸入資料,輸出2行,第一行為部分被包含在圓中的個子數。第二行為完全被包含在圓中的格子數。對每一個數入資料,輸出資料間要空一行。請參考Sample output
Sample Iutput
3
4
Sample Output
In the case n = 3, 20 cells contain
segments of the circle.
There are 12 cells completely contained in the circle.
In the case n = 4, 28 cells contain segments of the circle.
There are 24 cells completely contained in the circle.