- 博客(7)
- 收藏
- 关注
原创 二进制除法
<br />先解决了减法:<br />二进制减法也很简单,与加法一样,二进制减法有八条规则:<br />l0 – 0 = 0<br />l0 – 1 = 1 有借位<br />l1 – 0 = 1<br />l1 – 1 =0<br />l0 – 0 – 借位 = 1有借位<br />l0 – 1 – 借位 = 0有借位<br />l1 – 0 – 借位 = 0<br />l1 – 1 – 借位 = 1有借位<br />#include <iostream>#include <string>usin
2010-07-14 19:48:00
14212
原创 【基础】:十进制化成其他进制(easy)
【基础】:十进制化成其他进制(easy)Time Limit:1000MS Memory Limit:65536KTotal Submit:131 Accepted:34 Description【题目】键盘输入一个十进制的整数,及确定进制n,把这个数转换成相应的n进制输出。 (其中2〈=n〈=16)例如:输入10,n=3 则输出 (10)10=(101)3 Input一个整数m和进制n,用空格分开Output把这个数转换成相应的n进制数Sample Input10 3Sample Output(10)10
2010-06-23 09:10:00
923
原创 勇闯黄金十二宫……金牛宫
勇闯黄金十二宫……金牛宫Time Limit:1000MS Memory Limit:65536KTotal Submit:20 Accepted:3 DescriptionBackground: 话说星矢、紫龙、冰河、阿瞬为了救活雅典娜,必须勇闯黄金十二宫。 Problem: 第二个他们来到金牛宫,身为金牛座黄金圣斗士的阿尔迪巴挡住了他们的去路,最终星矢和阿尔迪巴经过很多回合的较量,星矢终于爆发小宇宙,领悟了第七感。而把阿尔迪巴的黄金牛角砍了下来。 不过阿尔迪巴并没有马上放星矢通过金牛宫,而是要考考星矢
2010-06-22 13:15:00
7855
原创 大数除法(高精度除法)解题日记 (c++源代码)
date:20100612一开始用模拟除法写了一个,用到了加法,减法,乘法,本来还打算用二分法进行优化的,可惜程序一直没有调试对。我暂时解决不了。今天用除法当减法来算。。写了一个程序。。两个数相近。。还好。。相差太远,程序跑得实在是太久了。刚想了另一个算法。回去试试。下面给我今天晚上写的除法。//v1.0 #include #include void sub(char a[101],char b[101]); using namespace std; int main() {
2010-06-12 21:06:00
25196
1
原创 速算24点 (c++实现)
#include #include using namespace std;int main(){float cal_model1(float a,float b,float c, float d,int op1,int op2,int op3);float cal_model2(float a,float b,float c, float d,int op1,int op
2010-05-28 18:40:00
2390
原创 打印平四边形星号图案
#include #include using namespace std;int main(){ int i,j;string stars="* * * * * *";for(i=1;i<=5;i++){ for(j=1;j<i;j++) cout<<" "; cout<<stars<<endl;}return 0;}
2010-03-22 20:02:00
1274
原创 自写的一个开根号(开方)程序 c语言
#include main(){int shuzi;double xiaoshu=0.1,c,lastc;;c=shuzi;scanf("%d",&shuzi);c=shuzi;for(;c*c>shuzi;)c-=1;for(;xiaoshu>0.0000001;){while(c*c<shuzi){lastc=c;c=c+
2010-02-17 14:54:00
28473
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人