d471. 0 與 1 的遊戲
Tags : 窮舉
Accepted rate : 1736人/1844人 ( 94% ) [非即時]
評分方式:
Tolerant

最近更新 : 2009-10-06 20:10

Content

有 1 個 bit,可以表示 0 與 1。

有 2 個 bit,可以表示 00,01,10,11。

有 n 個 bit,請產生所有 n 個 bit 所能表示的 2 進位數字。

Input

每行一個數字 n ( 0 < n < 15 )

代表 n 個bit

Output
 請參考範例輸出
Sample Input #1
1
2
Sample Output #1
0
1
00
01
10
11
測資資訊:
記憶體限制: 512 MB
公開 測資點#0 (100%): 3.0s , <1K
Hint :
字串是你的好朋友
Tags:
窮舉
出處:
葆葆 [管理者: maxyuan (葆葆老師) ]

Status Forum 排行

ID User Problem Subject Hit Post Date
35425 jeremydinger ... (164253) d471
72 2023-06-01 22:54
32245 yp11051026@y ... (911-24吳秉儒) d471
二進位果然鰾緊
262 2022-09-25 00:06
28286 41075001H (『 』) d471
解題思路
580 2021-11-25 21:07
25817 morrisddd (MORRIS 范智傑) d471
543 2021-06-24 17:23
25467 t3893527 (奇異果) d471
977 2021-05-23 08:59