結果

問題 No.779 Heisei
ユーザー megane_anko
提出日時 2021-02-27 15:16:25
言語 TypeScript
(5.7.2)
結果
AC  
実行時間 63 ms / 1,000 ms
コード長 635 bytes
コンパイル時間 8,118 ms
コンパイル使用メモリ 229,072 KB
実行使用メモリ 39,424 KB
最終ジャッジ日時 2024-12-31 16:29:38
合計ジャッジ時間 10,036 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

import * as fs from 'fs';
const input = fs.readFileSync('/dev/stdin', 'utf8');

//1989-1/8
//2019-4/30

const YMDarray = input.split(' ');
const Y = parseInt(YMDarray[0]);
const M = parseInt(YMDarray[1]);
const D = parseInt(YMDarray[2]);

//平成がはじまるまでに経った日にち
const start = (1989 - 1969) * 365 + (1 - 1) * 31 + 8;
//平成が終わるまでに経った日にち
const end = (2019 - 1969) * 365 + (4 - 1) * 31 + 30;
//取得した日までに経った日にち
const now = (Y - 1969) * 365 + (M - 1) * 31 + D;

if ((start <= now) && (now <= end)) {
    console.log('Yes');
} else {
    console.log('No');
}
0