歐幾里德算法:輾轉(zhuǎn)求余 原理: gcd(a,b)=gcd(b,a mod b) 當(dāng)b為0時(shí),兩數(shù)的最大公約數(shù)即為a getchar()會(huì)接受前一個(gè)scanf的回車符
標(biāo)簽: gcd getchar scanf mod
上傳時(shí)間: 2014-01-10
上傳用戶:2467478207
數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì) 數(shù)據(jù)結(jié)構(gòu)B+樹(shù) B+ tree Library
標(biāo)簽: Library tree 數(shù)據(jù)結(jié)構(gòu) 樹(shù)
上傳時(shí)間: 2013-12-31
上傳用戶:semi1981
* 高斯列主元素消去法求解矩陣方程AX=B,其中A是N*N的矩陣,B是N*M矩陣 * 輸入: n----方陣A的行數(shù) * a----矩陣A * m----矩陣B的列數(shù) * b----矩陣B * 輸出: det----矩陣A的行列式值 * a----A消元后的上三角矩陣 * b----矩陣方程的解X
上傳時(shí)間: 2015-07-26
上傳用戶:xauthu
(1) 、用下述兩條具體規(guī)則和規(guī)則形式實(shí)現(xiàn).設(shè)大寫字母表示魔王語(yǔ)言的詞匯 小寫字母表示人的語(yǔ)言詞匯 希臘字母表示可以用大寫字母或小寫字母代換的變量.魔王語(yǔ)言可含人的詞匯. (2) 、B→tAdA A→sae (3) 、將魔王語(yǔ)言B(ehnxgz)B解釋成人的語(yǔ)言.每個(gè)字母對(duì)應(yīng)下列的語(yǔ)言.
上傳時(shí)間: 2013-12-30
上傳用戶:ayfeixiao
1.有三根桿子A,B,C。A桿上有若干碟子 2.每次移動(dòng)一塊碟子,小的只能疊在大的上面 3.把所有碟子從A桿全部移到C桿上 經(jīng)過(guò)研究發(fā)現(xiàn),漢諾塔的破解很簡(jiǎn)單,就是按照移動(dòng)規(guī)則向一個(gè)方向移動(dòng)金片: 如3階漢諾塔的移動(dòng):A→C,A→B,C→B,A→C,B→A,B→C,A→C 此外,漢諾塔問(wèn)題也是程序設(shè)計(jì)中的經(jīng)典遞歸問(wèn)題
標(biāo)簽: 移動(dòng) 發(fā)現(xiàn)
上傳時(shí)間: 2016-07-25
上傳用戶:gxrui1991
1. 下列說(shuō)法正確的是 ( ) A. Java語(yǔ)言不區(qū)分大小寫 B. Java程序以類為基本單位 C. JVM為Java虛擬機(jī)JVM的英文縮寫 D. 運(yùn)行Java程序需要先安裝JDK 2. 下列說(shuō)法中錯(cuò)誤的是 ( ) A. Java語(yǔ)言是編譯執(zhí)行的 B. Java中使用了多進(jìn)程技術(shù) C. Java的單行注視以//開(kāi)頭 D. Java語(yǔ)言具有很高的安全性 3. 下面不屬于Java語(yǔ)言特點(diǎn)的一項(xiàng)是( ) A. 安全性 B. 分布式 C. 移植性 D. 編譯執(zhí)行 4. 下列語(yǔ)句中,正確的項(xiàng)是 ( ) A . int $e,a,b=10 B. char c,d=’a’ C. float e=0.0d D. double c=0.0f
上傳時(shí)間: 2017-01-04
上傳用戶:netwolf
數(shù)字運(yùn)算,判斷一個(gè)數(shù)是否接近素?cái)?shù) A Niven number is a number such that the sum of its digits divides itself. For example, 111 is a Niven number because the sum of its digits is 3, which divides 111. We can also specify a number in another base b, and a number in base b is a Niven number if the sum of its digits divides its value. Given b (2 <= b <= 10) and a number in base b, determine whether it is a Niven number or not. Input Each line of input contains the base b, followed by a string of digits representing a positive integer in that base. There are no leading zeroes. The input is terminated by a line consisting of 0 alone. Output For each case, print "yes" on a line if the given number is a Niven number, and "no" otherwise. Sample Input 10 111 2 110 10 123 6 1000 8 2314 0 Sample Output yes yes no yes no
上傳時(shí)間: 2015-05-21
上傳用戶:daguda
The government of a small but important country has decided that the alphabet needs to be streamlined and reordered. Uppercase letters will be eliminated. They will issue a royal decree in the form of a String of B and A characters. The first character in the decree specifies whether a must come ( B )Before b in the new alphabet or ( A )After b . The second character determines the relative placement of b and c , etc. So, for example, "BAA" means that a must come Before b , b must come After c , and c must come After d . Any letters beyond these requirements are to be excluded, so if the decree specifies k comparisons then the new alphabet will contain the first k+1 lowercase letters of the current alphabet. Create a class Alphabet that contains the method choices that takes the decree as input and returns the number of possible new alphabets that conform to the decree. If more than 1,000,000,000 are possible, return -1. Definition
標(biāo)簽: government streamline important alphabet
上傳時(shí)間: 2015-06-09
上傳用戶:weixiao99
TLV1544與TMS320VC5402通過(guò)串行口連接,此時(shí),A/D轉(zhuǎn)換芯片作為從設(shè)備,DSP提供幀同步和輸入/輸出時(shí)鐘信號(hào)。TLV1544與DSP之間數(shù)據(jù)交換的時(shí)序圖如圖3所示。 開(kāi)始時(shí), 為高電平(芯片處于非激活狀態(tài)),DATA IN和I/OCLK無(wú)效,DATAOUT處于高阻狀態(tài)。當(dāng)串行接口使CS變低(激活),芯片開(kāi)始工作,I/OCLK和DATAIN能使DATA OUT不再處于高阻狀態(tài)。DSP通過(guò)I/OCLK引腳提供輸入/輸出時(shí)鐘8序列,當(dāng)由DSP提供的幀同步脈沖到來(lái)后,芯片從DATA IN接收4 b通道選擇地址,同時(shí)從DATAOUT送出的前一次轉(zhuǎn)換的結(jié)果,由DSP串行接收。I/OCLK接收DSP送出的輸入序列長(zhǎng)度為10~16個(gè)時(shí)鐘周期。前4個(gè)有效時(shí)鐘周期,將從DATAIN輸入的4 b輸入數(shù)據(jù)裝載到輸入數(shù)據(jù)寄存器,選擇所需的模擬通道。接下來(lái)的6個(gè)時(shí)鐘周期提供模擬輸入采樣的控制時(shí)間。模擬輸入的采樣在前10個(gè)I/O時(shí)鐘序列后停止。第10個(gè)時(shí)鐘沿(確切的I/O時(shí)鐘邊緣,即上升沿或下降沿,取決于操作的模式選擇)將EOC變低,轉(zhuǎn)換開(kāi)始。
上傳時(shí)間: 2014-12-05
上傳用戶:yepeng139
WMTSA toolbox is an implemenation for MATLAB of the wavelet methods for time series analysis techniques presented in: Percival, D. B. and A. T. Walden (2000) Wavelet Methods for Time Series Analysis. Cambridge: Cambridge University Press.
標(biāo)簽: implemenation for analysis toolbox
上傳時(shí)間: 2014-01-15
上傳用戶:huangld
蟲(chóng)蟲(chóng)下載站版權(quán)所有 京ICP備2021023401號(hào)-1