結果
| 問題 | No.780 オフ会 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2021-06-13 22:51:41 | 
| 言語 | TypeScript (5.7.2) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 81 ms / 2,000 ms | 
| コード長 | 737 bytes | 
| コンパイル時間 | 8,231 ms | 
| コンパイル使用メモリ | 229,396 KB | 
| 実行使用メモリ | 42,420 KB | 
| 最終ジャッジ日時 | 2024-12-31 16:39:05 | 
| 合計ジャッジ時間 | 10,831 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 23 | 
ソースコード
export { }
let lines = '';
const reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', function (line) {
  //lines.push(line);
  lines = line
});
reader.on('close', function () {
  //console.log('lines', lines)
  const hoge = lines.split(" ")
  
  const man: number = parseInt(hoge[0])
  const woman: number = parseInt(hoge[1])
  
  
  if (woman > man) {
    console.log('YES')
  } else {
    console.log('NO')
  }
  if (woman === man + 1) {
    console.log('0')
  } else if (woman > man) {
    const surplus: number = Math.abs(woman - man) - 1
    console.log(surplus)
  } else {
    const surplus: number = Math.abs(woman - man) + 1
    console.log(surplus)
  }
});
            
            
            
        