- 博客(6)
- 收藏
- 关注
原创 《算法竞赛入门经典》习题答案 -- Chapter II
习题2-1 位数(digit)题目:输入一个不超过10的9次方的正整数,输出它的位数,例如12735的位数是5。不使用任何数学函数。分析:主要是考察循环的使用,while循环和for循环均可,择其一。程序:C语言:Codee#2655501 #include 02 03 int main()04 {05 int i = 0;06
2012-05-25 15:27:46
1898
原创 《算法竞赛入门经典》习题答案 -- Chapter I
习题1-1 平均数(average)题目:输入3个整数,输出它们的平均数,保留3位小数分析:主要考察的是C语言打印函数(printf)的输出格式 + 强制类型转换C中格式字符串的一般形式为: %[标志][输出最小宽度][.精度][长度]类型, 其中方括号[]中的项为可选项。各项的意义介绍如下:表示输出类型的格式字符 格式字符意义a
2012-05-18 17:46:21
1069
原创 [UvaOJ - Getting Started] 494 - Kindergarten Counting Game
Kindergarten Counting Game Everybody sit down in a circle. Ok. Listen to me carefully.``Woooooo, you scwewy wabbit!''Now, could someone tell me how many words I just said?Input and
2012-05-18 15:47:15
296
原创 [UvaOJ - Getting Started] 458 - The Decoder
The Decoder Write a complete program that will correctly decode a set of characters into a valid message. Your program should read a given file of a simple coded set of characters and print the ex
2012-05-18 13:35:39
313
原创 [UvaOJ - Getting Started] 10071 - Back to High School Physics
Problem BBack to High School PhysicsInput: standard inputOutput: standard output A particle has initial velocity and constant acceleration. Ifits velocity after certain time is v then what w
2012-05-17 17:30:49
327
原创 [UvaOJ - Getting Started] 10055 - Hashmat the Brave Warrior
Problem AHashmat the brave warriorInput: standard inputOutput: standard output Hashmat is a brave warrior whowith his group of young soldiers moves from one place to another to fightagainst
2012-05-17 17:22:28
300
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人