寫一個程序,列出在0和1之間的所有分母不大于N的最簡分?jǐn)?shù),下面是N=5時的情況: 0/1 1/5 1/4 1/3 2/5 1/2 3/5 2/3 3/4 4/5 1/1 總共有11個分?jǐn)?shù)! 還需要進(jìn)行排序。
標(biāo)簽: 程序
上傳時間: 2013-12-11
上傳用戶:chenbhdt
質(zhì)數(shù)豎式 下面的豎式是一個乘法運(yùn)算問題,它的每個*號可以代入一個數(shù)字, 這個數(shù)字屬于一個特定的由N個數(shù)字組成的集合。如果這個集合是{2,3,5,7}, 那么這個豎式稱作“質(zhì)數(shù)豎式”。 此程序就是為了解決這樣一個問題而做的。
標(biāo)簽: 乘法運(yùn)算
上傳時間: 2013-12-22
上傳用戶:xz85592677
北京航空航天大學(xué)劉金琨《先進(jìn)pid控制》各章的源代碼。都是用matlab編寫,在matlab53.,6.5,7.0都可以運(yùn)行。
標(biāo)簽: matlab pid 航空航天 大學(xué)
上傳時間: 2013-12-17
上傳用戶:ccclll
這是一套非常優(yōu)秀的皮膚組件包,是破解版,不含源代碼。 For Delphi 5, 6, 7, 2005, 2006,這是目前的最新版本,等待源碼版本推出。
標(biāo)簽:
上傳時間: 2013-12-14
上傳用戶:linlin
Input The input consists of two lines. The first line contains two integers n and k which are the lengths of the array and the sliding window. There are n integers in the second line. Output There are two lines in the output. The first line gives the minimum values in the window at each position, from left to right, respectively. The second line gives the maximum values. Sample Input 8 3 1 3 -1 -3 5 3 6 7 Sample Output -1 -3 -3 -3 3 3 3 3 5 5 6 7
標(biāo)簽: The two consists contains
上傳時間: 2014-12-21
上傳用戶:hongmo
一:需求分析 1. 問題描述 魔王總是使用自己的一種非常精練而抽象的語言講話,沒人能聽懂,但他的語言是可逐步解釋成人能聽懂的語言,因?yàn)樗恼Z言是由以下兩種形式的規(guī)則由人的語言逐步抽象上去的: ----------------------------------------------------------- (1) a---> (B1)(B2)....(Bm) (2)[(op1)(p2)...(pn)]---->[o(pn)][o(p(n-1))].....[o(p1)o] ----------------------------------------------------------- 在這兩種形式中,從左到右均表示解釋.試寫一個魔王語言的解釋系統(tǒng),把 他的話解釋成人能聽得懂的話. 2. 基本要求: 用下述兩條具體規(guī)則和上述規(guī)則形式(2)實(shí)現(xiàn).設(shè)大寫字母表示魔王語言的詞匯 小寫字母表示人的語言的詞匯 希臘字母表示可以用大寫字母或小寫字母代換的變量.魔王語言可含人的詞匯. (1) B --> tAdA (2) A --> sae 3. 測試數(shù)據(jù): B(ehnxgz)B 解釋成 tsaedsaeezegexenehetsaedsae若將小寫字母與漢字建立下表所示的對應(yīng)關(guān)系,則魔王說的話是:"天上一只鵝地上一只鵝鵝追鵝趕鵝下鵝蛋鵝恨鵝天上一只鵝地上一只鵝". | t | d | s | a | e | z | g | x | n | h | | 天 | 地 | 上 | 一只| 鵝 | 追 | 趕 | 下 | 蛋 | 恨 |
上傳時間: 2014-12-02
上傳用戶:jkhjkh1982
在Jpeg中Huffman采用的是范式Huffman編碼。經(jīng)過查相關(guān)資料有兩種不同說法,請高手指點(diǎn)。謝謝! 1、構(gòu)造范式 Huffman 編碼的方法大致是: 分別統(tǒng)計從最大編碼長度 maxlength 到 1 的每個長度對應(yīng)了多少個符號。根據(jù)這一信息從 maxlength 個 0 開始以遞增順序?yàn)槊總€符號分配編碼。例如,編碼長度為 5 的符號有 4 個,長度為 3 的有 1 個,長度為 2 的有 3 個,則分配的編碼依次為: 00000 00001 00010 00011 001 01 10 11 問題:如果按照這種說法那么我在一付圖像中渡到的數(shù)據(jù)是:編碼長度為 6 的符號有 1 個,長度為 5 的有 1 個,長度為 4 的有 3 個,長度為3的個數(shù)為4個,長度為2的個數(shù)為1個。按照以上的算法得到的編碼為:000000;00001;0010;0011;001;010;011;100;01。出現(xiàn)001是0011的前綴。在讀取數(shù)據(jù)流的時候?qū)⒉荒軈^(qū)別。 2、另外一種說法,曾經(jīng)發(fā)帖問過。前面的長度編碼加1左移一位得到后面長度的編碼。像我這個例子如何確定最短碼的起始值? 謝謝大家指點(diǎn)具體的范式Huffman編碼實(shí)現(xiàn)
上傳時間: 2015-11-15
上傳用戶:蠢蠢66
實(shí)驗(yàn)?zāi)康模鹤寣W(xué)生掌握開發(fā)Java應(yīng)用程序的三個步驟:編寫源文件、編譯源文件和運(yùn)行應(yīng)用程序。掌握J(rèn)ava程序的基本語句。 1、試編寫一個程序,將1~500間能同時被2,5,7整除的數(shù)打印出來。 2、試編寫一個程序,顯示如圖所示的一個數(shù)字金字塔。 1 121 12321 1234321 123454321 12345654321 1234567654321 123456787654321 12345678987654321 3、如果我國的經(jīng)濟(jì)增長以每年7.5%的速度保持穩(wěn)定不變,試編寫一個程序,計算過多少年可以實(shí)現(xiàn)總量翻兩番?
標(biāo)簽: Java 應(yīng)用程序 編寫 程序
上傳時間: 2016-01-15
上傳用戶:風(fēng)之驕子
We have a group of N items (represented by integers from 1 to N), and we know that there is some total order defined for these items. You may assume that no two elements will be equal (for all a, b: a<b or b<a). However, it is expensive to compare two items. Your task is to make a number of comparisons, and then output the sorted order. The cost of determining if a < b is given by the bth integer of element a of costs (space delimited), which is the same as the ath integer of element b. Naturally, you will be judged on the total cost of the comparisons you make before outputting the sorted order. If your order is incorrect, you will receive a 0. Otherwise, your score will be opt/cost, where opt is the best cost anyone has achieved and cost is the total cost of the comparisons you make (so your score for a test case will be between 0 and 1). Your score for the problem will simply be the sum of your scores for the individual test cases.
標(biāo)簽: represented integers group items
上傳時間: 2016-01-17
上傳用戶:jeffery
此源程序?qū)崿F(xiàn)了打印出 * 金字塔的功能,總共輸出5行,1~5行分別是1,3,5,7,9個‘* .
上傳時間: 2013-12-30
上傳用戶:懶龍1988
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1