虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

7<b>00</b>0

  • 数字运算

    数字运算,判断一个数是否接近素数 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

    标签: 数字 运算

    上传时间: 2015-05-21

    上传用户:daguda

  • The government of a small but important country has decided that the alphabet needs to be streamline

    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

    标签: government streamline important alphabet

    上传时间: 2015-06-09

    上传用户:weixiao99

  • 目录 前 言 第一章 Qt的安装 第二章 Hello World 第三章 C/C++ 基础 第四章 窗口部件 第五章 对话框 第六章 主应用窗口程序 第七章 文件与目录处理 第

    目录 前 言 第一章 Qt的安装 第二章 Hello World 第三章 C/C++ 基础 第四章 窗口部件 第五章 对话框 第六章 主应用窗口程序 第七章 文件与目录处理 第八章 数据库编程 第九章 程序调试与异常处理 附录A:Qt3.0新特性 附录B:Qt3.0类分组列表

    标签: Hello World 目录 窗口

    上传时间: 2014-01-19

    上传用户:维子哥哥

  • 前 言 第一章 Qt的安装 第二章 Hello World 第三章 C/C++ 基础 第四章 窗口部件 第五章 对话框 第六章 主应用窗口程序 第七章 文件与目录处理 第八章 数据库

    前 言 第一章 Qt的安装 第二章 Hello World 第三章 C/C++ 基础 第四章 窗口部件 第五章 对话框 第六章 主应用窗口程序 第七章 文件与目录处理 第八章 数据库编程 第九章 程序调试与异常处理 附录A:Qt3.0新特性 附录B:Qt3.0类分组列表

    标签: Hello World 窗口 对话框

    上传时间: 2017-04-19

    上传用户:hebmuljb

  • 本代码为编码开关代码

    本代码为编码开关代码,编码开关也就是数字音响中的 360度旋转的数字音量以及显示器上用的(单键飞梭开 关)等类似鼠标滚轮的手动计数输入设备。 我使用的编码开关为5个引脚的,其中2个引脚为按下 转轮开关(也就相当于鼠标中键)。另外3个引脚用来 检测旋转方向以及旋转步数的检测端。引脚分别为a,b,c b接地a,c分别接到P2.0和P2.1口并分别接两个10K上拉 电阻,并且a,c需要分别对地接一个104的电容,否则 因为编码开关的触点抖动会引起轻微误动作。本程序不 使用定时器,不占用中断,不使用延时代码,并对每个 细分步数进行判断,避免一切误动作,性能超级稳定。 我使用的编码器是APLS的EC11B可以参照附件的时序图 编码器控制流水灯最能说明问题,下面是以一段流水 灯来演示。

    标签: 代码 编码开关

    上传时间: 2017-07-03

    上传用户:gaojiao1999

  • 离散实验 一个包的传递 用warshall

     实验源代码 //Warshall.cpp #include<stdio.h> void warshall(int k,int n) { int i , j, t; int temp[20][20]; for(int a=0;a<k;a++) { printf("请输入矩阵第%d 行元素:",a); for(int b=0;b<n;b++) { scanf ("%d",&temp[a][b]); } } for(i=0;i<k;i++){ for( j=0;j<k;j++){ if(temp[ j][i]==1) { for(t=0;t<n;t++) { temp[ j][t]=temp[i][t]||temp[ j][t]; } } } } printf("可传递闭包关系矩阵是:\n"); for(i=0;i<k;i++) { for( j=0;j<n;j++) { printf("%d", temp[i][ j]); } printf("\n"); } } void main() { printf("利用 Warshall 算法求二元关系的可传递闭包\n"); void warshall(int,int); int k , n; printf("请输入矩阵的行数 i: "); scanf("%d",&k); 四川大学实验报告 printf("请输入矩阵的列数 j: "); scanf("%d",&n); warshall(k,n); } 

    标签: warshall 离散 实验

    上传时间: 2016-06-27

    上传用户:梁雪文以

  • 道理特分解法

    #include "iostream" using namespace std; class Matrix { private: double** A; //矩阵A double *b; //向量b public: int size; Matrix(int ); ~Matrix(); friend double* Dooli(Matrix& ); void Input(); void Disp(); }; Matrix::Matrix(int x) { size=x; //为向量b分配空间并初始化为0 b=new double [x]; for(int j=0;j<x;j++) b[j]=0; //为向量A分配空间并初始化为0 A=new double* [x]; for(int i=0;i<x;i++) A[i]=new double [x]; for(int m=0;m<x;m++) for(int n=0;n<x;n++) A[m][n]=0; } Matrix::~Matrix() { cout<<"正在析构中~~~~"<<endl; delete b; for(int i=0;i<size;i++) delete A[i]; delete A; } void Matrix::Disp() { for(int i=0;i<size;i++) { for(int j=0;j<size;j++) cout<<A[i][j]<<" "; cout<<endl; } } void Matrix::Input() { cout<<"请输入A:"<<endl; for(int i=0;i<size;i++) for(int j=0;j<size;j++){ cout<<"第"<<i+1<<"行"<<"第"<<j+1<<"列:"<<endl; cin>>A[i][j]; } cout<<"请输入b:"<<endl; for(int j=0;j<size;j++){ cout<<"第"<<j+1<<"个:"<<endl; cin>>b[j]; } } double* Dooli(Matrix& A) { double *Xn=new double [A.size]; Matrix L(A.size),U(A.size); //分别求得U,L的第一行与第一列 for(int i=0;i<A.size;i++) U.A[0][i]=A.A[0][i]; for(int j=1;j<A.size;j++) L.A[j][0]=A.A[j][0]/U.A[0][0]; //分别求得U,L的第r行,第r列 double temp1=0,temp2=0; for(int r=1;r<A.size;r++){ //U for(int i=r;i<A.size;i++){ for(int k=0;k<r-1;k++) temp1=temp1+L.A[r][k]*U.A[k][i]; U.A[r][i]=A.A[r][i]-temp1; } //L for(int i=r+1;i<A.size;i++){ for(int k=0;k<r-1;k++) temp2=temp2+L.A[i][k]*U.A[k][r]; L.A[i][r]=(A.A[i][r]-temp2)/U.A[r][r]; } } cout<<"计算U得:"<<endl; U.Disp(); cout<<"计算L的:"<<endl; L.Disp(); double *Y=new double [A.size]; Y[0]=A.b[0]; for(int i=1;i<A.size;i++ ){ double temp3=0; for(int k=0;k<i-1;k++) temp3=temp3+L.A[i][k]*Y[k]; Y[i]=A.b[i]-temp3; } Xn[A.size-1]=Y[A.size-1]/U.A[A.size-1][A.size-1]; for(int i=A.size-1;i>=0;i--){ double temp4=0; for(int k=i+1;k<A.size;k++) temp4=temp4+U.A[i][k]*Xn[k]; Xn[i]=(Y[i]-temp4)/U.A[i][i]; } return Xn; } int main() { Matrix B(4); B.Input(); double *X; X=Dooli(B); cout<<"~~~~解得:"<<endl; for(int i=0;i<B.size;i++) cout<<"X["<<i<<"]:"<<X[i]<<" "; cout<<endl<<"呵呵呵呵呵"; return 0; } 

    标签: 道理特分解法

    上传时间: 2018-05-20

    上传用户:Aa123456789

  • IW3617 230V 调光设计参考.pdf

    General Design Specification:1. AC Input Range 180-264Vac, Isolated ac-dc offline, 12LEDS,Output 700mA2. Intelligent wall dimmer detections(Leading-edge dimmer , Trailing-edgedimmer , No-dimmer)3. Multiple dimming control scheme4. Wide dimming range from 1% up to 100%5. No visible flicker6. Resonant control to achieve high efficiency7. High Power Factor, 0.9 without dimmer8. Temperature degrade control to adjust the LED9. Primary-only Sensing eliminates opto-isolator feedback and simplifies design

    标签: iw3617

    上传时间: 2021-12-03

    上传用户:canderile

  • Proteus仿真LCD12864显示动画—飞翔的鸽子

    程序:LCD12664液晶显示原理unsigned int/W/图形编码,也可以把图形代码存为头文件。该程序经过调试。PROTEUS原理图见截图unsigned char code table1[][64]={/*-调入了一幅图像:D:\Desktop\新建文件夹(2)l.bmp--*//*-宽度x高度=128×64一*材0x00,0×00,0×00,0×00,0×00,0×00,0x80,0x80,0xD0,0XE0,0XE0,0xC0,0xF0,0xF8,OXF C,0xF8,0xF8,0xB8,0x3C,0x78,0XFO,0XFA,0XFC,0XFC,0xCC,Ox1E,0X3C,OxF8,0xF0,0XE0,0x DO,0×00,0x80,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0x00,0x00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0x00,0×00,0×00,0×00,0×00,0×00,0x00,0×00,0×00,0×00,0x00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0x00,0x00,0x00,0×00,0x00,0×00,0×00,0×00,0×00,0×00,0×00,0×00,0x00,0×00,0×00,0x00,0×00,0×00,

    标签: proteus lcd12864 显示动画

    上传时间: 2022-07-04

    上传用户:slq1234567890

  • GEMS压力变送器3000系列-超高压变送器

    6 GEMS压力变送器3000系列-超高压变送器 GEMS压力变送器3000的行业应用: 船舶、工程机械 产品特点: ■工作压力可高达10,000PSI ■高精度-在整个应用过程中,精度在±0.15%之内 ■高稳定性-长期漂移≤0.05%FS/6年 ■高的抗震动性能-采用了薄膜溅射式设计,取消了易破的连接线 GEMS压力变送器3000的性能参数 精度 0.15%FS 重复性 0.03%FS 长期稳定性 0.06%F.S/年 压力范围 0-500、1000、2000、3000、5000、6000、7500、10,000psi 耐压 2xF.S,15,000PSI,Max. 破裂压力 7xFS 4xFS,对于10,000psi 疲劳寿命 108次满量程循环 零点公差 0.5%F.S 量程公差 0.5%F.S,响应时间0.5毫秒 温度影响 温漂 1.5%FS(-20℃到80℃) 2%FS(-40℃到100℃) 2.7%FS(-55℃到120℃) GEMS压力变送器3000的环境参数 振动 正弦曲线,峰值70g,5~5000HZ(根据MIL-STD810,514.2方法程序I) EMC 30V/m(100V/m Survivability) 电压输出 电路 见PDF文件(3线) 激励 高于满程电压1.5VDC,最大到35VDC@6mA 最小环路电阻 (FS输出/2)Kohms 供电灵敏度 0.01%FS/Volt 电流输出 电路 2线 环路供电电压 24VDC(7-35VDC) 输出 4-20mA 最大环路电阻 (Vs-7)x50Ω 供电灵敏度 0.01%FS/V 比率输出 输出 0.5v到4.5v(3线)@5VDC供电 输出激励电压 5VDC(4.75V-7VDC) GEMS压力变送器3000的物理参数 壳体 IP65代码G(NEMA4);IP67代码F(NEMA6) 接液部件 17-4和15-5不锈钢 电气连接 见订货指南 压力连接 1/4″NPT或G1/4 重量(约) 110g(电缆重量另加:75g/m) 机械震动 1000g/MIL-STD810,方法516.2,程序Ⅳ 加速度 在任意方向施加100g的稳定加速度时1bar(15psi)量程变送器的输出会波动0.032%FS/g,量程增大到400bar(6000psi)时输出波动会按对数递减至0.0007%FS/g. 认证等级 CE

    标签: GEMS 3000 压力变送器 超高压

    上传时间: 2013-10-09

    上传用户:sdfsdfs1