internet documents 有三種:static documents dynamic documents active
documents。請說明這三者最主要的差別為何?(15 分)
執行下列遞迴(Recursion)程式,並回答下列各題:
public class CrazyR
{
public static void R(int n, int t)
{
if (n == 0)
{
StdOut.print(t + " ");
return;
}
R(n-1, 3*t);
R(n-1, 3*t+2);
R(n-1, 3*t+1);
}
public static void main(String[] args)
{
R(2, 0);
StdOut.println();
}
}
程式執行時會產生那些遞迴呼叫(Recursive call),依執行順序畫出其樹狀結構。(8 分)
程式在執行後依序列出輸出的數字。(4 分)
A
B
A
B
A
B
A
B
OR
OR
OR
OR
AND
AND
NOT
NOT
NOT
NOT
NOT
NOT
AND
output
output
output
output
103年公務人員高等考試三級考試試題
代號:
全一張
(背面)
22750、26550
26650、26750