• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • YouClaw
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
Hug_Sea
博客园    首页    新随笔    联系   管理    订阅  订阅

文章分类 -  Light OJ

1136 - Division by 3

摘要:题意:There is sequence 1, 12, 123, 1234, ..., 12345678910, ... . Now you are given two integers A and B, you have to find the number of integers from Ath number to Bth (inclusive) number, which are divisible by 3.For example, let A = 3. B = 5. So, the numbers in the sequence are, 123, 1234, 12345. And 阅读全文
posted @ 2012-05-15 09:55 Hug_Sea 阅读(799) 评论(0) 推荐(0)
1045 - Digits of Factorial(数论)

摘要:题意:给定n、k,求出n的阶乘转化为k进制一共有几位。思路:log(a*b)=log(a)+log(b)..............题目链接:http://www.lightoj.com/volume_showproblem.php?problem=1045View Code 1 #include <cstdio> 2 #include <cstring> 3 #include <cmath> 4 #include <string> 5 #include <algorithm> 6 #include <iostream> 阅读全文
posted @ 2012-05-14 11:10 Hug_Sea 阅读(169) 评论(0) 推荐(0)
1305 - Area of a Parallelogram

摘要:题意:给定平行四边形的3个顶点的坐标,求第四个点的坐标和平行四边形的面积。思路:几何基础题,不过用向量比较简单。题目链接:http://www.lightoj.com/volume_showproblem.php?problem=1305View Code 1 #include <cstdio> 2 #include <cstring> 3 #include <cmath> 4 #include <string> 5 #include <algorithm> 6 #include <iostream> 7 using na 阅读全文
posted @ 2012-05-12 19:39 Hug_Sea 阅读(229) 评论(0) 推荐(0)
1234 - Harmonic Number

摘要:题意:给定n,求1+1/2+1/3+....+1/n,1<=n<=10^8。思路:精度问题,欧拉常数:0.57721566490153286060651209 ,当n很大时就派上用场了- -!题目链接:http://www.lightoj.com/volume_showproblem.php?problem=1234View Code 1 #include <cstdio> 2 #include <cstring> 3 #include <cmath> 4 #include <string> 5 #include <algori 阅读全文
posted @ 2012-05-12 19:22 Hug_Sea 阅读(231) 评论(0) 推荐(0)

博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3