Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÓÃjavaʵÏֵĺ£Ã÷Âë¼°ÑéÖ¤³ö´íλ

Ö»ÊÇ×î¼òµ¥µÄʵÏÖ£¬¿ÉÔÚÆä»ù´¡ÉÏʵÏÖÆäËû¹¦ÄÜ¡£
import java.util.Scanner;
public class Ham {
 
 Scanner enter=new Scanner(System.in);
 String s_data;           //ÊäÈëµÄ×Ö·û´®ÀàÐ͵ÄÊý¾Ý
 int dlength;             //ÊäÈëÊý¾ÝµÄ³¤¶È
 int[] data;              //½«ÊäÈëµÄÊý¾Ýת»»³ÉÕûÐÍÊý¾Ý
 int hlength;            //º£Ã÷Â볤¶È
 int[] ham;              //º£Ã÷Âë
 int plength;            //УÑé볤¶È
 int[] p;                //УÑéλ
 int[] c;                //ÑéÖ¤³ö´íλÊýµÄÊý×é
 
 void input(){
  System.out.println("ÊäÈëÊý¾Ý£º");
  String s_data=enter.nextLine();
  dlength=s_data.length();
  data=new int[dlength];
  for(int i=0;i<dlength;i++){
   data[i]=Integer.parseInt(s_data.substring(i, i+1));
//System.out.print(data[i]);
  }
  generateHam();
 }
 
 void generateHam(){
  int i=1;
  int label=1; //Ö¸Ïòº£Ã÷ÂëµÄУÑéλ
  int k=data.length-1;    //Ö¸ÏòÊý¾Ýλ
  while(Math.pow(2, i)<dlength+i+1){
   i++;
  }
  plength=i;  //УÑéλλÊý
p=new int[plength];
c=new int[plength];
//System.out.println("plength "+plength);
  hlength=dlength+plength;
  ham=new int[hlength];
  
  /*
   * Ïòº£Ã÷ÂëÖÐÌîдÊý¾Ýλ
   */
  for(int j=0;j<h


Ïà¹ØÎĵµ£º

Java NIO APIÏê½â

 
Java NIO APIÏê½â
ÔÚJDK
1.4ÒÔÇ°£¬JavaµÄIO²Ù×÷¼¯ÖÐÔÚjava.ioÕâ¸ö°üÖУ¬ÊÇ»ùÓÚÁ÷µÄ×èÈû£¨blocking£©API¡£¶ÔÓÚ´ó¶àÊýÓ¦ÓÃÀ´Ëµ£¬ÕâÑùµÄAPIʹÓúܷ½
±ã£¬È»¶ø£¬Ò»Ð©¶ÔÐÔÄÜÒªÇó½Ï¸ßµÄÓ¦Óã¬ÓÈÆäÊÇ·þÎñ¶ËÓ¦Óã¬ÍùÍùÐèÒªÒ»¸ö¸üΪÓÐЧµÄ·½Ê½À´´¦ÀíIO¡£´ÓJDK 1.4Æð£¬NIO
API×÷Ϊһ¸ö»ùÓÚ»º³åÇø£¬²¢ÄÜÌṩ·Ç×èÈû(non-blo ......

×î´ó³Ë»ýµÄN 1ÏֻÓó˷¨²»ÄÜÓó˷¨ (Java)ʵÏÖ

package algorithm.misc;
import util.*;
public class MaxProductOfN1 {
    private static int exceptIndex = -1;
   
    public static long regMethod(int data[])
    {
        long ret = Long.MIN_VALUE;
& ......

±±´óÇàÄñJAVA¡¢C#¡¢.NETµÈÈí¼þ¼¼Êõ¾ÍÒµÅàѵ°à

±±´óÇàÄñJAVA¡¢C#¡¢.NETµÈÈí¼þ¼¼Êõ¾ÍÒµÅàѵ°à
 
ÐÅÏ¢¼¼Êõʱ´ú£¬´òÔìITר²Å¡£¶«Ý¸±±´óÇàÄñ½ðÂëУÇøÁªºÏ3000Óà¼ÒITÃûÆ󣬶¨ÏòÅàÑøÆóÒµ½ôȱµÄITÈí¼þ¹¤³ÌʦÈ˲š£
 
Åàѵ¿Î³Ì¼ò½é£º
 
ÒÀÍб±¾©´óѧ½ÌÓý×ÊÔ´¡¢±±´óÇàÄñ¼¯ÍÅÔÚITÐÐÒµµÄÓÅÊÆ¡¢Ó¡¶ÈAPTECHרҵ»¯µÄITÖ°Òµ½ÌÓý¾­Ñ飬ACCP½Ì³Ì²ÉÓÃÈ«Çòͬ²½Ñз¢»úÖÆ ......

java»ñÈ¡ËùÓÐϵͳ±äÁ¿

public static void getSysProp(){
Properties props = System.getProperties();
Set<Entry<Object,Object>> res = props.entrySet();
Iterator it = res.iterator();
while (it.hasNext())
{
Map.Entry e = (Map.Entry)it.next();
......

java±ÊÊÔ

1.ʲôÊǶÔÏó£¬Ê²Ã´ÊÇÃæÏò¶ÔÏó£¬Ê²Ã´ÊÇÀࣿ
ÏÖʵÊÀ½çÖÐÈκÎʵÌ嶼¿ÉÒÔ¿´×÷ÊǶÔÏó¡£ËûÃÇÓÐÁ½ÖÖÌØÕ÷£ºËûÃǶ¼ÓµÓÐ״̬ÓëÐÐΪ¡£Èí¼þÖеĶÔÏóÓÐ×Ô¼ºµÄÊôÐÔºÍÄܹ»Ö´ÐеIJÙ×÷¡£
ËùνÃæÏò¶ÔÏó¾ÍÊÇ»ùÓÚ¶ÔÏó¸ÅÄÒÔ¶ÔÏóΪÖÐÐÄ£¬ÒÔÀàºÍ¼Ì³ÐΪ¹¹Ôì»úÖÆ£¬À´ÈÏʶ¡¢Àí½â¡¢¿Ì»­¿Í¹ÛÊÀ½çºÍÉè¼Æ¡¢¹¹½¨ÏàÓ¦µÄÈí¼þϵͳ¡£
Àà¾ÍÊǶÔÒ»¸öÊÂÎ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ