結果
| 問題 | No.780 オフ会 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-07-10 23:41:31 | 
| 言語 | TypeScript (5.7.2) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 77 ms / 2,000 ms | 
| コード長 | 568 bytes | 
| コンパイル時間 | 7,696 ms | 
| コンパイル使用メモリ | 229,332 KB | 
| 実行使用メモリ | 42,420 KB | 
| 最終ジャッジ日時 | 2024-12-31 16:15:04 | 
| 合計ジャッジ時間 | 10,478 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 23 | 
ソースコード
const lines = [];
const reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', function (line) {
  lines.push(line);
});
reader.on('close', function () {
  const input: string = lines[0]
  const arr: number[] = input.split(' ').map(str => parseInt(str, 10))
  const men = arr[0]
  const women = arr[1]
  const result = women >= men + 1 ? true : false
  if (result) {
    console.log('YES');
    console.log(women - (men + 1));
  } else {
    console.log('NO');
    console.log((men + 1) - women);
  }
});
            
            
            
        