歐幾里德算法:輾轉求余 原理: gcd(a,b)=gcd(b,a mod b) 當b為0時,兩數的最大公約數即為a getchar()會接受前一個scanf的回車符
上傳時間: 2014-01-10
上傳用戶:2467478207
數據結構課程設計 數據結構B+樹 B+ tree Library
上傳時間: 2013-12-31
上傳用戶:semi1981
* 高斯列主元素消去法求解矩陣方程AX=B,其中A是N*N的矩陣,B是N*M矩陣 * 輸入: n----方陣A的行數 * a----矩陣A * m----矩陣B的列數 * b----矩陣B * 輸出: det----矩陣A的行列式值 * a----A消元后的上三角矩陣 * b----矩陣方程的解X
上傳時間: 2015-07-26
上傳用戶:xauthu
(1) 、用下述兩條具體規則和規則形式實現.設大寫字母表示魔王語言的詞匯 小寫字母表示人的語言詞匯 希臘字母表示可以用大寫字母或小寫字母代換的變量.魔王語言可含人的詞匯. (2) 、B→tAdA A→sae (3) 、將魔王語言B(ehnxgz)B解釋成人的語言.每個字母對應下列的語言.
上傳時間: 2013-12-30
上傳用戶:ayfeixiao
1.有三根桿子A,B,C。A桿上有若干碟子 2.每次移動一塊碟子,小的只能疊在大的上面 3.把所有碟子從A桿全部移到C桿上 經過研究發現,漢諾塔的破解很簡單,就是按照移動規則向一個方向移動金片: 如3階漢諾塔的移動:A→C,A→B,C→B,A→C,B→A,B→C,A→C 此外,漢諾塔問題也是程序設計中的經典遞歸問題
上傳時間: 2016-07-25
上傳用戶:gxrui1991
1. 下列說法正確的是 ( ) A. Java語言不區分大小寫 B. Java程序以類為基本單位 C. JVM為Java虛擬機JVM的英文縮寫 D. 運行Java程序需要先安裝JDK 2. 下列說法中錯誤的是 ( ) A. Java語言是編譯執行的 B. Java中使用了多進程技術 C. Java的單行注視以//開頭 D. Java語言具有很高的安全性 3. 下面不屬于Java語言特點的一項是( ) A. 安全性 B. 分布式 C. 移植性 D. 編譯執行 4. 下列語句中,正確的項是 ( ) A . int $e,a,b=10 B. char c,d=’a’ C. float e=0.0d D. double c=0.0f
上傳時間: 2017-01-04
上傳用戶:netwolf
數字運算,判斷一個數是否接近素數 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
上傳時間: 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
標簽: government streamline important alphabet
上傳時間: 2015-06-09
上傳用戶:weixiao99
TLV1544與TMS320VC5402通過串行口連接,此時,A/D轉換芯片作為從設備,DSP提供幀同步和輸入/輸出時鐘信號。TLV1544與DSP之間數據交換的時序圖如圖3所示。 開始時, 為高電平(芯片處于非激活狀態),DATA IN和I/OCLK無效,DATAOUT處于高阻狀態。當串行接口使CS變低(激活),芯片開始工作,I/OCLK和DATAIN能使DATA OUT不再處于高阻狀態。DSP通過I/OCLK引腳提供輸入/輸出時鐘8序列,當由DSP提供的幀同步脈沖到來后,芯片從DATA IN接收4 b通道選擇地址,同時從DATAOUT送出的前一次轉換的結果,由DSP串行接收。I/OCLK接收DSP送出的輸入序列長度為10~16個時鐘周期。前4個有效時鐘周期,將從DATAIN輸入的4 b輸入數據裝載到輸入數據寄存器,選擇所需的模擬通道。接下來的6個時鐘周期提供模擬輸入采樣的控制時間。模擬輸入的采樣在前10個I/O時鐘序列后停止。第10個時鐘沿(確切的I/O時鐘邊緣,即上升沿或下降沿,取決于操作的模式選擇)將EOC變低,轉換開始。
上傳時間: 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.
標簽: implemenation for analysis toolbox
上傳時間: 2014-01-15
上傳用戶:huangld