import java.io.*;
public class Main {
public static void main
(String[] args
) { try {
System.
out.
print("西暦を整数で入力してください(例: 2012): "); int year
= Integer.
parseInt(br.
readLine()); // 明治 1868
// 大正 1912
// 昭和 1926
// 平成 1989
System.
out.
println("入力された西暦は,明治だと" + (year
-1867) + "年,大正だと" + (year
-1911) + "年,昭和だと" + (year
-1925) + "年,平成だと" + (year
-1988) + "年です."); System.
out.
println("この年に夏季オリンピックは開催されま" + (year
%4
==0 ? "した." : "せんでした.")); ex.printStackTrace();
} finally {
if(br
!= null) { try {} catch(Exception ex
) {} } }
}
}
aW1wb3J0IGphdmEuaW8uKjsKCnB1YmxpYyBjbGFzcyBNYWluIHsKICAgIHB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZ1tdIGFyZ3MpIHsKICAgICAgICBCdWZmZXJlZFJlYWRlciBiciA9IG51bGw7CiAgICAgICAgdHJ5IHsKICAgICAgICAgICAgYnIgPSBuZXcgQnVmZmVyZWRSZWFkZXIobmV3IElucHV0U3RyZWFtUmVhZGVyKFN5c3RlbS5pbikpOwogICAgICAgICAgICBTeXN0ZW0ub3V0LnByaW50KCLopb/mmqbjgpLmlbTmlbDjgaflhaXlipvjgZfjgabjgY/jgaDjgZXjgYQo5L6LOiAyMDEyKTogIik7CiAgICAgICAgICAgIGludCB5ZWFyID0gSW50ZWdlci5wYXJzZUludChici5yZWFkTGluZSgpKTsKICAgICAgICAgICAgLy8g5piO5rK7IDE4NjgKICAgICAgICAgICAgLy8g5aSn5q2jIDE5MTIKICAgICAgICAgICAgLy8g5pit5ZKMIDE5MjYKICAgICAgICAgICAgLy8g5bmz5oiQIDE5ODkKICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCLlhaXlipvjgZXjgozjgZ/opb/mmqbjga/vvIzmmI7msrvjgaDjgagiICsgKHllYXItMTg2NykgKyAi5bm077yM5aSn5q2j44Gg44GoIiArICh5ZWFyLTE5MTEpICsgIuW5tO+8jOaYreWSjOOBoOOBqCIgKyAoeWVhci0xOTI1KSArICLlubTvvIzlubPmiJDjgaDjgagiICsgKHllYXItMTk4OCkgKyAi5bm044Gn44GZ77yOIik7CiAgICAgICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigi44GT44Gu5bm044Gr5aSP5a2j44Kq44Oq44Oz44OU44OD44Kv44Gv6ZaL5YKs44GV44KM44G+IiArICh5ZWFyJTQ9PTAgPyAi44GX44Gf77yOIiA6ICLjgZvjgpPjgafjgZfjgZ/vvI4iKSk7CiAgICAgICAgfSBjYXRjaChFeGNlcHRpb24gZXgpIHsKICAgICAgICAgICAgZXgucHJpbnRTdGFja1RyYWNlKCk7CiAgICAgICAgfSBmaW5hbGx5IHsKICAgICAgICAgICAgaWYoYnIgIT0gbnVsbCkgeyB0cnkge30gY2F0Y2goRXhjZXB0aW9uIGV4KSB7fSB9CiAgICAgICAgfQogICAgfQp9