同一個數(shù)會由于采用不同的基數(shù)而使得其表現(xiàn)的形式是完全不一樣的,在我們的學(xué)習(xí)中,我們熟悉的基數(shù)有10進制、12進制、60進制、2進制、8進制和16進制。比如數(shù)據(jù)12,如果我們用2進制表示,則它就是1100;如果用3進制表示就是110;如果用8進制表示則是14。我們的編程任務(wù)就是與數(shù)的進制(也就是基數(shù))有關(guān)。 程序中我們會給大家很多個數(shù)對(假設(shè)每個數(shù)對的數(shù)用X和Y表示),程序需要解決的問題就是為X和Y各選擇一個最小的基數(shù),以使得這兩個數(shù)在其選擇的基數(shù)上是一對相等的數(shù)。 例如,12和5這個數(shù)對,我們可以為12選擇基數(shù)3,為5選擇基數(shù)6,這樣一來12(base 3)=5(base 6),因為12(base 3)就是10進制數(shù)5,而5(base 6)也是10進制數(shù)中的5。 程序的輸入是通過文件完成的。 文件中的每一行都包含一個數(shù)對X和Y,兩個數(shù)通過一個或多個空格符分割,與X和Y相關(guān)聯(lián)的有效基數(shù)值范圍為2~36。X和Y的合理數(shù)值表示字符包括0—9和A-Z(表示數(shù)值10-35)。 文件的最后一行用一個數(shù)字0表示輸入的結(jié)束。
標(biāo)簽:
上傳時間: 2013-12-17
上傳用戶:skfreeman
說明: 此計算機可以計算同時超過多個操作項的什. 例如: y = 3 + 64 * (2 + 3^5) + sinPI 的值, 用括號區(qū)分優(yōu)先級,如果有大量很長的算式需要計算,可以試一下這個計算器. 開發(fā)語言: C#語言,用Stack原理實現(xiàn)
上傳時間: 2013-12-22
上傳用戶:change0329
BNB20 Finds the constrained minimum of a function of several possibly integer variables. % Usage: [errmsg,Z,X,t,c,fail] = % BNB20(fun,x0,xstatus,xlb,xub,A,B,Aeq,Beq,nonlcon,settings,options,P1,P2,...) % % BNB solves problems of the form: % Minimize F(x) subject to: xlb <= x0 <=xub % A*x <= B Aeq*x=Beq % C(x)<=0 Ceq(x)=0 % x(i) is continuous for xstatus(i)=0 % x(i) integer for xstatus(i)= 1 % x(i) fixed for xstatus(i)=2 %
標(biāo)簽: constrained variables function possibly
上傳時間: 2014-01-13
上傳用戶:youth25
Problem Statement You are given a string input. You are to find the longest substring of input such that the reversal of the substring is also a substring of input. In case of a tie, return the string that occurs earliest in input. Definition Class: ReverseSubstring Method: findReversed Parameters: string Returns: string Method signature: string findReversed(string input) (be sure your method is public) Notes The substring and its reversal may overlap partially or completely. The entire original string is itself a valid substring (see example 4). Constraints input will contain between 1 and 50 characters, inclusive. Each character of input will be an uppercase letter ( A - Z ). Examples 0) "XBCDEFYWFEDCBZ" Returns: "BCDEF" We see that the reverse of BCDEF is FEDCB, which appears later in the string. 1)
標(biāo)簽: input Statement You are
上傳時間: 2015-09-21
上傳用戶:sunjet
這是一段vhdl程序,它是由桂林電子科大編寫,完成stack功能
上傳時間: 2015-09-21
上傳用戶:luke5347
對電磁波入射的源為偶極子進行仿真,可以z作為其他電磁仿真問題中的源的設(shè)置子函數(shù)用
上傳時間: 2015-09-22
上傳用戶:ryb
This m file analyzes a coherent binary phase shift keyed(BPSK) and a amplitude shift keyed(ASK) communication system. The receiver uses a correlator(mixer-integrator[LPF]) configuration with BER measurements comparing measured and theoretical results. The bandpass and low pass used in the receiver are constructed using z transforms.
標(biāo)簽: keyed shift amplitude analyzes
上傳時間: 2015-09-26
上傳用戶:liuchee
tms320c6711-fft 調(diào)試環(huán)境:code composer studio3.1 采用查表方式對心電圖信號進行處理 設(shè)置注意:project-build options-linker-stack size 設(shè)為5
標(biāo)簽: options-linker-s project-build composer studio
上傳時間: 2014-01-03
上傳用戶:JIUSHICHEN
算法結(jié)構(gòu)的編程,用stack和queue的算法,c++的編程
上傳時間: 2013-12-29
上傳用戶:685
Romberg求定積分 輸入:積分區(qū)間[a,b],被積函數(shù)f(x,y,z) 輸出:積分結(jié)果
上傳時間: 2015-10-14
上傳用戶:妄想演繹師
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1