Author : Jisan
Programming language : Java
Difficulty : A little Advance.
Status : Accepted
Problem number : UVA-458
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=399
Help: http://docs.oracle.com/javase/7/docs/api/java/io/DataInputStream.html and http://docs.oracle.com/javase/7/docs/api/java/io/DataOutputStream.html
Code:
import java.io.*;
public class Uva_458 {
public static void main(String args[]) throws IOException{
DataInputStream i=new DataInputStream(System.in);
DataOutputStream o=new DataOutputStream(System.out);
int M=0;
while((M=i.read())!=-1){
System.out.write((Character.isSpace((char)M)?M:(M-7)));
}
}
}
Programming language : Java
Difficulty : A little Advance.
Status : Accepted
Problem number : UVA-458
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=399
Help: http://docs.oracle.com/javase/7/docs/api/java/io/DataInputStream.html and http://docs.oracle.com/javase/7/docs/api/java/io/DataOutputStream.html
Code:
import java.io.*;
public class Uva_458 {
public static void main(String args[]) throws IOException{
DataInputStream i=new DataInputStream(System.in);
DataOutputStream o=new DataOutputStream(System.out);
int M=0;
while((M=i.read())!=-1){
System.out.write((Character.isSpace((char)M)?M:(M-7)));
}
}
}
No comments:
Post a Comment