mirror of
https://github.com/Dichgrem/Java.git
synced 2025-12-16 20:42:00 -05:00
style:fmt
This commit is contained in:
@@ -3,12 +3,12 @@ package com.study.demo;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class test7 {
|
||||
public static void main(String[] args) {
|
||||
Scanner scanner = new Scanner(System.in);
|
||||
int x = scanner.nextInt();
|
||||
int y = scanner.nextInt();
|
||||
int startYear = 2016, startMonth = 8;
|
||||
int totalMonths = (x - startYear) * 12 + y - startMonth + 1;
|
||||
System.out.println(totalMonths);
|
||||
}
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
Scanner scanner = new Scanner(System.in);
|
||||
int x = scanner.nextInt();
|
||||
int y = scanner.nextInt();
|
||||
int startYear = 2016, startMonth = 8;
|
||||
int totalMonths = (x - startYear) * 12 + y - startMonth + 1;
|
||||
System.out.println(totalMonths);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user