Rabbits and Recurrence Relations (ID: FIB)

Problem

假設兔子需一個月性成熟,,性成熟後每對兔子每個月必繁殖 k 對子代,且不因任何因素死亡,則求 n 月後的兔子對數。

Given: Positive integers n≤40 and k≤5.

Return: The total number of rabbit pairs that will be present after n months, if we begin with 1 pair and in each generation, every pair of reproduction-age rabbits produces a litter of k rabbit pairs (instead of only 1 pair).

Complementing a Strand of DNA (ID: REVC)

Problem

給定 DNA 序列,回傳其反向互補序列

Given: A DNA string s of length at most 1000 bp.

Return: The reverse complement sc of s.

Transcribing DNA into RNA (ID: RNA)

Problem

模擬 DNA 轉錄 RNA 的過程,將給定 DNA 字串中的 T 替換為 U。

Given: A DNA string t having length at most 1000 nt.

Return: The transcribed RNA string of t.

Counting DNA Nucleotides (ID: DNA)

Problem


給定 DNA 字串,回傳四鹼基符號於字串內的數量

Given: A DNA string s of length at most 1000 nt.

Return: Four integers (separated by spaces) counting the respective number of times that the symbols 'A', 'C', 'G', and 'T' occur in s. 
Back to top