-
題目:利用條件運(yùn)算符的嵌套來(lái)完成此題:學(xué)習(xí)成績(jī)>=90分的同學(xué)用A表示,60-89分之間的用B表示,60分以下的用C表示。 1.程序分析:(a>b)?a:b這是條件運(yùn)算符的基本例子。
標(biāo)簽:
gt
90
運(yùn)算符
嵌套
上傳時(shí)間:
2015-01-08
上傳用戶:lifangyuan12
-
RSA算法 :首先, 找出三個(gè)數(shù), p, q, r, 其中 p, q 是兩個(gè)相異的質(zhì)數(shù), r 是與 (p-1)(q-1) 互質(zhì)的數(shù)...... p, q, r 這三個(gè)數(shù)便是 person_key,接著, 找出 m, 使得 r^m == 1 mod (p-1)(q-1)..... 這個(gè) m 一定存在, 因?yàn)?r 與 (p-1)(q-1) 互質(zhì), 用輾轉(zhuǎn)相除法就可以得到了..... 再來(lái), 計(jì)算 n = pq....... m, n 這兩個(gè)數(shù)便是 public_key ,編碼過(guò)程是, 若資料為 a, 將其看成是一個(gè)大整數(shù), 假設(shè) a < n.... 如果 a >= n 的話, 就將 a 表成 s 進(jìn)位 (s
標(biāo)簽:
person_key
RSA
算法
上傳時(shí)間:
2013-12-14
上傳用戶:zhuyibin
-
slickeditv10.0linuxcrackz.w.t.zip
SlickEdit v10.0 for linux 注冊(cè)機(jī)
在國(guó)內(nèi)網(wǎng)站上找了N天都沒(méi)找到,在國(guó)外一家網(wǎng)站找到。雖然不是源代碼,但是SlickEdit是Linux下最好用的30多種編程IDE。這個(gè)是注冊(cè)機(jī)安裝文件在百度裡找吧
標(biāo)簽:
10.0
linuxcrackz
slickeditv
SlickEdit
上傳時(shí)間:
2013-12-10
上傳用戶:大融融rr
-
數(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
標(biāo)簽:
數(shù)字
運(yùn)算
上傳時(shí)間:
2015-05-21
上傳用戶:daguda
-
源代碼\用動(dòng)態(tài)規(guī)劃算法計(jì)算序列關(guān)系個(gè)數(shù)
用關(guān)系"<"和"="將3個(gè)數(shù)a,b,c依次序排列時(shí),有13種不同的序列關(guān)系:
a=b=c,a=b<c,a<b=v,a<b<c,a<c<b
a=c<b,b<a=c,b<a<c,b<c<a,b=c<a
c<a=b,c<a<b,c<b<a
若要將n個(gè)數(shù)依序列,設(shè)計(jì)一個(gè)動(dòng)態(tài)規(guī)劃算法,計(jì)算出有多少種不同的序列關(guān)系,
要求算法只占用O(n),只耗時(shí)O(n*n).
標(biāo)簽:
lt
源代碼
動(dòng)態(tài)規(guī)劃
序列
上傳時(shí)間:
2013-12-26
上傳用戶:siguazgb
-
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
-
電力系統(tǒng)在臺(tái)穩(wěn)定計(jì)算式電力系統(tǒng)不正常運(yùn)行方式的一種計(jì)算。它的任務(wù)是已知電力系統(tǒng)某一正常運(yùn)行狀態(tài)和受到某種擾動(dòng),計(jì)算電力系統(tǒng)所有發(fā)電機(jī)能否同步運(yùn)行
1運(yùn)行說(shuō)明:
請(qǐng)輸入初始功率S0,形如a+bi
請(qǐng)輸入無(wú)限大系統(tǒng)母線電壓V0
請(qǐng)輸入系統(tǒng)等值電抗矩陣B
矩陣B有以下元素組成的行矩陣
1正常運(yùn)行時(shí)的系統(tǒng)直軸等值電抗Xd
2故障運(yùn)行時(shí)的系統(tǒng)直軸等值電抗X d
3故障切除后的系統(tǒng)直軸等值電抗
請(qǐng)輸入慣性時(shí)間常數(shù)Tj
請(qǐng)輸入時(shí)段數(shù)N
請(qǐng)輸入哪個(gè)時(shí)段發(fā)生故障Ni
請(qǐng)輸入每時(shí)段間隔的時(shí)間dt
標(biāo)簽:
電力系統(tǒng)
正
計(jì)算
運(yùn)行
上傳時(shí)間:
2015-06-13
上傳用戶:it男一枚
-
Lattice 公 司 把 當(dāng) 今 兩 種 最 新 的 系 統(tǒng) 設(shè) 計(jì) 技 術(shù),VHDL 和 在 系 統(tǒng) 可 編 程 ( ISP ) 邏 輯 器 件 聯(lián) 系 在 一 起, 構(gòu) 成 了isp-VHDl Viewlogic 系 統(tǒng)。isp-VHDL 是 進(jìn) 行 電 子 系 統(tǒng) 設(shè) 計(jì) 的 強(qiáng) 有 力 的 工 具, 使 用 它 可 以 加 快 設(shè) 計(jì) 產(chǎn) 品 投 放 市 場(chǎng) 的 時(shí) 間。 isp-VHDL Viewlogic 軟 件 能 用 于 各 種 邏 輯 設(shè) 計(jì), 這 套 軟 件 具 有 功 能 強(qiáng) 大 的 VHDL 綜 合、原 理 圖 輸 入、功 能 與 時(shí) 序 仿 真、ispDS+ 適 配 器 和 ispDOWNLOAD 能 力。
標(biāo)簽:
Lattice
上傳時(shí)間:
2014-01-06
上傳用戶:luopoguixiong
-
介紹了基于87C52 微控制器和SA 8381 型PWM 產(chǎn)生芯片實(shí)現(xiàn)的SPWM 型單相逆變電源的全數(shù)字化控制系
統(tǒng)。詳細(xì)說(shuō)明了該逆變電源系統(tǒng)的原理構(gòu)成和主電路原理。簡(jiǎn)要說(shuō)明了M ITEL 公司的新型SA 8381 帶微處理器接口的可編
程SPWM 波形發(fā)生器的引腳功能、內(nèi)部框圖及工作原理, 說(shuō)明了他的技術(shù)特點(diǎn)、應(yīng)用范圍等, 并給出了逆變電源系統(tǒng)程序
框圖及控制回路程序流程, 軟件編程情況。
標(biāo)簽:
87C52
8381
ITEL
SPWM
上傳時(shí)間:
2014-08-15
上傳用戶:youmo81
-
摘要:AD9852是美國(guó)ANALOGDEVICES公司生產(chǎn)的新型直接數(shù)字頻率合成器(DDS),具有頻率轉(zhuǎn)換速度快(小于lt~s)、頻譜純度高、工作溫度范圍寬(一25℃~+85℃)、集成度高等特點(diǎn),是一種使用方便靈活、功能較強(qiáng)的芯片。AD9852由帶有48位相位累加的數(shù)控振蕩器、可墑程參考時(shí)鐘倍乘器、反向正弦濾波器、計(jì)數(shù)倍乘器、兩個(gè)300MHz12住數(shù)模轉(zhuǎn)換器、高速模擬比較器和接口邏輯組成。可用于本振合成回路,高精度時(shí)鐘發(fā)生器和FSK//3PSK調(diào)制。文中介紹了AD9852的工作原理、引腳功能以廈具體應(yīng)用。
標(biāo)簽:
ANALOGDEVICES
9852
DDS
AD
上傳時(shí)間:
2015-11-30
上傳用戶:kiklkook