两道笔试题

上一篇 / 下一篇  2008-06-11 16:55:08 / 个人分类:拿来主义

--找出表中91-100之间的记录条数
select top 10 StartDate from QY_ZpInfo where StartDate in(select top 100 StartDate from QY_ZpInfo order by StartDate asc)order by StartDate Desc

//求13的13次方的后三位数(比较简单了,总结下而已,路过的不要笑)

#include "iostream.h"
void main()
{
 long i=13,x,y,a,b,c,sum1=1,sum2=1,sum3=1;
 int j;
 for(j=0;j<=6;j++)
 {
  sum1=sum1*i;
 }
 x=sum1%1000;//考虑到会有数据溢出,所以先做7次13
 for(j=0;j<=5;j++)
 {
  sum2=sum2*i;
 }
 y=sum2%1000;//再做6次13
 sum3=x*y;//取后3位相乘
 a=sum3%10;
 b=(sum3%100-a)/10;
 c=(sum3%1000-10*b-a)/100;
 cout<<c<<b<<a<<endl;
}


TAG: 拿来主义

 

评分:0

我来说两句

我的栏目

日历

« 2024-05-04  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 8019
  • 日志数: 15
  • 图片数: 1
  • 建立时间: 2008-06-04
  • 更新时间: 2008-10-24

RSS订阅

Open Toolbar