2013年8月12日
摘要: 代码功能:输入年份和月份,可得到对应日历表,如上图。代码如下:import java.util.*;public class date { public static void main(String[] args){ Scanner in=new Scanner(System.in); //System.out.println("") System.out.println("请输入年份:"); int year=in.nextInt(); System.out.println("请输入月份:"); int month=in.next 阅读全文
posted @ 2013-08-12 16:33 YQH760 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 代码功能:输入对应数据,经过运行,打印表格,得到所需排名表格不解释 ,直接贴上java代码:import java.util.*;public class A5_18 { public static void main(String[] args){ Scanner in=new Scanner(System.in); System.out.println("请输入学生的人数:"); int number1=in.nextInt(); System.out.println("请输入课程的门数:"); int number2=in.nextInt(); S 阅读全文
posted @ 2013-08-12 16:18 YQH760 阅读(133) 评论(0) 推荐(0) 编辑
  2013年1月9日
摘要: 题目描述:Given a positive integer N, you should output the leftmost digit of N^N.题目分析: 由于N给的数据是10^9,很显然将N一个个乘起来那就是你不想活了啊。一般对于a^b我们是进行取对数,这道题也不例外。题目转化: 设 M = N^N , 等式两边去对数 log10 log10 ( M ) = log10 ( N^N ) = N * log10 ( N ) 再化简过去 可得: M = 10 ^( N*log10(N) ) 我们假设 N * log10( N ) = A + B (其中A为... 阅读全文
posted @ 2013-01-09 20:59 YQH760 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 题目描述:lcy gives a hard puzzle to feng5166,lwg,JGShining and Ignatius: gave a and b,how to know the a^b.everybody objects to this BT problem,so lcy makes the problem easier than begin.this puzzle describes that: gave a and b,how to know the a^b's the last digit number.But everybody is too lazy to 阅读全文
posted @ 2013-01-09 20:39 YQH760 阅读(633) 评论(0) 推荐(0) 编辑