|
精华帖 (0) :: 良好帖 (0) :: 隐藏帖 (0)
|
|
|---|---|
| 作者 | 正文 |
|
时间:2008-04-30
import java.io.*;
public class Main { String str[]=new String[10]; /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub long begin=System.currentTimeMillis(); System.out.println("请输入你的号码:"); try { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String ss=br.readLine(); if(contains(ss,'0')) { } else if(contains(ss,'1')) { } else { Test a=new Test(); Stack s=new Stack(); a.Perm(s, ss, 0); } long end=System.currentTimeMillis(); long t=end-begin; System.out.println("本次使用的时间是: "+t); } catch(Exception e) { System.out.println(" 00000 "+e.getMessage()); } } public static boolean contains(String s,char k) { for(int i=0;i<s.length();i++) { if(s.charAt(i)==k) return true; } return false; } } |
|
| 返回顶楼 | |
|
时间:2008-05-05
//2.2 求解:有一个文本文件,记录了某个学校所有人的姓名、出生日期(假设没有人重名,该校大约有2万人)。 import java.io.BufferedReader; public class Test1 { // display |
|
| 返回顶楼 | |


