Skip to content

Instantly share code, notes, and snippets.

@asika32764
Last active December 19, 2015 15:09
Show Gist options
  • Save asika32764/5974773 to your computer and use it in GitHub Desktop.
Save asika32764/5974773 to your computer and use it in GitHub Desktop.
請根據所給的振幅(Amplitude)及頻率(Frequency),你的程式要產生這樣的波。Input 資料由網址參數送進去。
Input
-------------------------------------
輸入的第一列有一個整數n,代表有幾組測試資料。接下來每組測試資料有2列,各有1個正整數(A、F),A代表振幅(A<=9),F代表頻率。
第一列以及各組測試資料間皆有一空白行。請參考Sample input。
Output
-------------------------------------
每組測試資料請輸出F個波,每個波振幅的水平高度為A。波本身是以其"高度"的內容所組成。每個波之間以一空白行分隔開來。
測試資料間也以一空白行分開。
請參考 sample output。
Sample input
-------------------------------------
2 <--- n
3 <--- A
2 <--- F
5 <--- A
3 <--- F
Sample Output
-------------------------------------
1
22
333
22
1
1
22
333
22
1
1
22
333
4444
55555
4444
333
22
1
1
22
333
4444
55555
4444
333
22
1
1
22
333
4444
55555
4444
333
22
1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment