原创 彙編語言 第一章 課後習題
檢測點1.1 (1)一個CPU的尋址能力爲8KB,那麼它的地址總線的寬度爲 13 解析:每根地址總線的狀態只有兩種,0和1,所以N根地址總線可以表示2^N個不同的數,所以它的的尋址能力爲2^N,1KB=2^10,所以8KB爲2^13,所
原创 HDU 1021 Fibonacci Again
Problem Description There are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2).
原创 HDU 1161Eddy's mistakes
Problem Description Eddy usually writes articles ,but he likes mixing the English letter uses, for example "computer sc
原创 HDU 1040 As Easy As A+B
HDU的水題。簡單的排序問題; 代碼如下,用了一下qsort來實驗一下,熟悉一下它的用法。 需要注意的是每行的最後一個數字後不能有空格。 #include <iostream> #include <stdio.h> #include <s
原创 HDU 1170 Balloon Comes!
Problem Description The contest starts now! How excited it is to see balloons floating around. You, one of the best pro
原创 Let the Balloon Rise
Problem Description Contest time again! How excited it is to see balloons floating around. But to tell you a secret, th
原创 HDU 1097 a hard puzzle
Problem Description lcy gives a hard puzzle to feng5166,lwg,JGShining and Ignatius: gave a and b,how to know the a^b.ev
原创 HDU 2014 青年歌手大獎賽_評委會打分
Problem Description 青年歌手大獎賽中,評委會給參賽選手打分。選手得分規則爲去掉一個最高分和一個最低分,然後計算平均得分,請編程輸出某選手的得分。 Input 輸入數據有多組,每組佔一行,每行的第一個數是n(2<n<
原创 HDU 2010 水仙花數
水仙花數 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 154127
原创 IOS開發中的KeyWindow
KeyWindow 即指在IOS開發中活躍窗口,即能接到鍵盤和非觸摸事件的一個窗口,一次只能有一個KeyWindow,在IOS 開發中,我們可以通過設置UIWindowLevel的數值來設置最前端的窗口爲哪個,Level數值越高的窗口越靠
原创 HDU 2009 求數列的和
求數列的和 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 66376
原创 c# 中的只讀屬性
當你想把一個屬性設置爲只讀屬性, 你只需要把set去掉,只設置get即可 ex; private bool hot; pblic bool Hot{get{return hot;}}即可
原创 HDU 1061 Rightmost Digit
Problem Description Given a positive integer N, you should output the most right digit of N^N. Input The input contai
原创 HDU 2016數據的交換輸出
Problem Description 輸入n(n<100)個數,找出其中最小的數,將它與最前面的數交換後輸出這些數。 Input 輸入數據有多組,每組佔一行,每行的開始是一個整數n,表示這個測試實例的數值的個數,跟着就是n個整數。n
原创 HDU 2011 多項式求和
Problem Description 多項式的描述如下: 1 - 1/2 + 1/3 - 1/4 + 1/5 - 1/6 + ... 現在請你求出該多項式的前n項的和。 Input 輸入數據由2行組成,首先是一個正整數m(m<100