Author : Jisan
Programming language : Java
Difficulty : Easy
Status : Accepted
Problem number : UVA-12708
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4446
Code:
import java.util.*;
public class Uva_12708 {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
int a=in.nextInt();
while(a>0){
long b=in.nextLong();
if(b%2!=0){
b--;
}
System.out.println(b/2);
a--;
}
}
}
Programming language : Java
Difficulty : Easy
Status : Accepted
Problem number : UVA-12708
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4446
Code:
import java.util.*;
public class Uva_12708 {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
int a=in.nextInt();
while(a>0){
long b=in.nextLong();
if(b%2!=0){
b--;
}
System.out.println(b/2);
a--;
}
}
}
No comments:
Post a Comment