CNN & ACM

BEIJING, China (CNN) — Chinese President Hu Jintao cut short his trip to Italy for a key economic summit to deal with ethnic violence raking northwestern China, state-run media reported Wednesday.

It’s interesting to read news about China on CNN, hehe, just for fun. though i always visit english websites for technical news and documentaries, this is almost the first time i read a complete political news on CNN.

It’s long time that i haven’t written any program. When i came across the word “ACM”, all sorts of feelings well up in my heart.

Then i visited the website of whu acm , when i took a browse on the problems i found that the first problem was “A+B” unexpectedly.

Here is a sample solution for problem 1001 using JAVA:

Now java compiler is jdk 1.5, next is program for 1001

import java.io.*;
import java.util.*;
public class Main
{
public static void main(String args[]) throws Exception
{
Scanner cin=new Scanner(System.in);
int a=cin.nextInt(),b=cin.nextInt();
System.out.println(a+b);
}
}

Old program for jdk 1.4

import java.io.*;
import java.util.*;
public class Main
{
public static void main (String args[]) throws Exception
{
BufferedReader stdin =
new BufferedReader(
new InputStreamReader(System.in));

String line = stdin.readLine();
StringTokenizer st = new StringTokenizer(line);
int a = Integer.parseInt(st.nextToken());
int b = Integer.parseInt(st.nextToken());
System.out.println(a+b);
}
}

3 days ago, this page was being read.

    Order by : Newer | Older

  1. TT 2009-07-09
    @15:58 Reply

    。。。。。。。。。。。。。。。。
    以后都不评了 行了吧

  2. suny 2009-07-09
    @14:07 Reply

    这是我自己的博客,请不要评价我的写作习惯

  3. suny 2009-07-09
    @10:15 Reply

    ….不是写给你们看的

  4. TT2009-07-09
    @13:02   to  sunyReply

    纯粹的自娱自乐啊你。。

  5. TT 2009-07-09
    @08:12 Reply

    那就不写呗
    搞这么敷衍人的东东。

  6. suny 2009-07-09
    @00:43 Reply

    NONTOPIC TODAY

Subscribe to Comments