基于通用集成運算放大器,利用MASON公式設計了一個多功能二階通用濾波器,能同時或分別實現低通、高通和帶通濾波,也能設計成一個正交振蕩器。電路的極點頻率和品質因數能夠獨立、精確地調節。電路使用4個集成運放、2個電容和11個電阻,所有集成運放的反相端虛地。利用計算機仿真電路的通用濾波功能、極點頻率和品質因數的獨立控制和正交正弦振蕩,從而證明該濾波器正確有效。
Abstract:
A new multifunctional second-order filter based on OPs was presented by MASON formula. Functions, such as high-pass, band-pass, low-pass filtering, can be realized respectively and simultaneously, and can become a quadrature oscillator by modifying resistance ratio. Its pole angular frequency and quality factor can be tuned accurately and independently. The circuit presented contains four OPs, two capacitors, and eleven resistances, and inverting input of all OPs is virtual ground. Its general filtering, the independent control of pole frequency and quality factor and quadrature sinusoidal oscillation were simulated by computer, and the result shows that the presented circuit is valid and effective.
RSA算法 :首先, 找出三個數, p, q, r, 其中 p, q 是兩個相異的質數, r 是與 (p-1)(q-1) 互質的數...... p, q, r 這三個數便是 person_key,接著, 找出 m, 使得 r^m == 1 mod (p-1)(q-1)..... 這個 m 一定存在, 因為 r 與 (p-1)(q-1) 互質, 用輾轉相除法就可以得到了..... 再來, 計算 n = pq....... m, n 這兩個數便是 public_key ,編碼過程是, 若資料為 a, 將其看成是一個大整數, 假設 a < n.... 如果 a >= n 的話, 就將 a 表成 s 進位 (s
數字運算,判斷一個數是否接近素數
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
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