코드비교

Old VersionNew Version
1import java.util.Scanner; 1import java.util.Scanner; 
2public class Main { 2public class Main { 
3public static void main(String[] args) { 3public static void main(String[] args) { 
4Scanner input = new Scanner(System.in); 4Scanner sc = new Scanner(System.in);
5double M = input.nextDouble(); 5double M = sc.nextDouble();
6double I = M * 39.3701; 6double I1 = M * 39.3701;
7double F = I / 12; 7double F1 = I1 / 12;
8int K = (int) F; 8double F2 = F1 % 1;
9double exI= (F-K)*12; 9double I2 = F2 * 12;
10System.out.printf("%d\n%d",K,(int) exI); 10System.out.printf("%.0f\n%.0f", (F1 - 0.5), (I2 - 0.5));
11} 11} 
12} 12} 
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
double M = input.nextDouble();
double I = M * 39.3701;
double F = I / 12;
int  K = (int) F;
double exI= (F-K)*12;
System.out.printf("%d\n%d",K,(int) exI);
}
}
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double M = sc.nextDouble();
double I1 = M * 39.3701;
double F1 = I1 / 12;
double F2 = F1 % 1;
double I2 = F2 * 12;
System.out.printf("%.0f\n%.0f", (F1 - 0.5), (I2 - 0.5));
}
}