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

JAVA ²ÊƱ³ÌÐò

import java.io.*;
public class CaiPiao {
 /**
  * @param args
  */
 public static void main(String[] args) {
  // TODO Auto-generated method stub
  String str;
  BufferedReader bufferReader = new BufferedReader(new InputStreamReader(System.in));
  try
  {
   str = bufferReader.readLine();
  }
  catch (IOException exc)
  {
   System.out.println("Error read from stdin!");
   return ;
  }
  
  int len = str.length();
  int[] number=new int[len];
  
     for(int i = 0; i < len; i++){
      number[i]=Integer.parseInt(str.substring(i,i+1));
     } 
         
     // 1234567890123
     int flag = 0;
     for( int i = 0; i < 13; i++ ){
      if( i >= 9 ){
       if( number[i] == (i - 9) ){
        flag++;
       }
         }else if( number[i] == (i+1) ){
          flag++;
         }
     }
         
     if( flag == 13 ){
      System.out.println("1");
     }else if( flag == 12 ){
      System.out.println("2");
     }else if( flag == 11 ){
      System.out.println("3");
     }else{
      System.out.println("No");
     }
     &nb


Ïà¹ØÎĵµ£º

JAVA³£¼ûÒì³£(ת)

1. java.lang.nullpointerexception
¡¡¡¡Õâ¸öÒì³£´ó¼Ò¿Ï¶¨¶¼¾­³£Óöµ½£¬Òì³£µÄ½âÊÍÊÇ"³ÌÐòÓöÉÏÁË¿ÕÖ¸Õë"£¬¼òµ¥µØËµ¾ÍÊǵ÷ÓÃÁËδ¾­³õʼ»¯µÄ¶ÔÏó»òÕßÊDz»´æÔڵĶÔÏó£¬Õâ¸ö´íÎó¾­³£³öÏÖÔÚ´´½¨Í¼Æ¬£¬µ÷ÓÃÊý×éÕâЩ²Ù×÷ÖУ¬±ÈÈçͼƬδ¾­³õʼ»¯£¬»òÕßͼƬ´´½¨Ê±µÄ·¾¶´íÎóµÈµÈ¡£¶ÔÊý×é²Ù×÷ÖгöÏÖ¿ÕÖ¸Õ룬ºÜ¶àÇé¿öÏÂÊÇһЩ¸Õ¿ªÊ¼Ñ§ ......

Java»ù´¡Æª£º£¨Ò»£©javaÈëÃÅ

1.       javaÊÇʲô
JavaÊÇÒ»ÖÖ±à³ÌÓïÑÔ£¬¸ú»ã±à¡¢C¡¢C++Ò»Ñù£¬ÊÇÓÃÓÚÈí¼þ±à³ÌµÄ¿ª·¢ÓïÑÔ¡£
JavaÊÇÒ»ÖÖ¿ª·¢¡¢ÔËÐл·¾³£¬java³ÌÐòµÄ¿ª·¢ÒªÒÀÀµÕâÖÖ»·¾³¡£
2.       javaµÄÌØµã
javaÓïÑÔ¾ßÓÐÓëÆ½Ì¨Î޹أ¬ÃæÏò¶ÔÏ󣬽¡×³ÐÔµÄÌØµã
1).ÓëÆ½Ì¨µÄÎÞ¹ØÐÔ
Óëjav ......

javaС½á

1 ×÷ÓÃÓò
   javaÖÐ×÷ÓÃÓòµÄ·¶Î§ÓÉ»¨À¨ºÅ±êʾ¡£
2¹ØÓÚstatic 
 À¬»øÊÕ¼¯Æ÷Ö»ÖªµÀËѼ¯ÄÇЩÓÐnewÔËËã·û·ÖÅäµÄÄڴ棬²»ÖªµÀÈçºÎÊÍ·ÅÌØÊâÄÚ´æ¡£
 Èç¹ûÀ¬»øÊÕ¼¯Æ÷×¼±¸»ØÊÕ¶ÔÏóµÄÄڴ棬ËüÊ×Ïȵ÷ÓÃfinalize()£¬¶øÇÒÖ»ÓÐÔÚÏÂÒ»´ÎÀ¬»øËѼ¯¹ý³ÌÖУ¬²Å»áÕæÕý»ØÊÕ¶ÔÏóµÄÄÚ´æ¡£ËùÒÔ˵Èç¹ûʹÓÃ
 final ......

java µÄÖÐ½× servlet Rubicon

Ó¦¸Ã¾ÍÊǰÑjava ÀïÃæµÄ×é¼þ¸ãÃ÷°×
Servlet
ServletÊÇÒ»ÖÖ»ùÓÚwebµÄJava×é¼þ£¬ËüÓÉÈÝÆ÷¹ÜÀí£¬²¢¶¯Ì¬Éú³ÉÆäÄÚÈÝ
ÔòûÓÐͼÐνçÃæ£¬ÔËÐÐÔÚ·þÎñÆ÷¶Ë
ËüÃǶ¼ÓÐÒ»¸öÉú´æÖÜÆÚ£¬°üº¬init()ºÍdestroy()·½·¨
 ²»ÊǶÀÁ¢µÄÓ¦ÓóÌÐò£¬Ã»ÓÐmain()·½·¨
Ó봫ͳµÄCGIºÍÐí¶àÆäËûÀàËÆCGIµÄ¼¼ÊõÏà±È£¬Java Servlet¾ßÓиü¸ßµÄЧÂÊ£¬¸ ......

java ¼¯ºÏ—— ×ܽá1£¨²¿·ÖÐèÒª¼ÌÐøÍêÉÆ£©


£¨1£©À༯µÄ²úÉúÄ¿µÄ
À༯¼òµ¥À´½²¾ÍÊÇÒ»¸ö¶¯Ì¬µÄ¶ÔÏóÊý×飬´Ë¶ÔÏóÊý×é¿ÉÒԸıä´óС£¬¿ÉÒÔÈÎÒâµÄʵÏÖ¶ÔÏóµÄÔö¼Ó¡¢É¾³ý¡¢Êä³ö¡£ËùÓеÄÀ༯´æ·Åjava.util°üÖС£
£¨2£©À༯µÄ»®·Ö 
1¡¢´æ·Åµ¥Öµ£ºCollection 
2¡¢´æ·ÅÒ»¶ÔÖµ£ºMap 
3¡¢Êä³ö£ºIterator
Collection£¨´æ·Åµ¥Öµ£©
©ÀList
©¦©ÀLinkedList
© ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ