結果
| 問題 | 
                            No.780 オフ会
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2021-06-13 17:55:39 | 
| 言語 | TypeScript  (5.7.2)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 645 bytes | 
| コンパイル時間 | 8,245 ms | 
| コンパイル使用メモリ | 228,884 KB | 
| 実行使用メモリ | 42,680 KB | 
| 最終ジャッジ日時 | 2024-12-31 16:39:07 | 
| 合計ジャッジ時間 | 10,860 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 23 | 
ソースコード
export { }
let 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 man: number = parseInt(lines[0])
  const woman: number = parseInt(lines[1])
  let surplus: number = 0
  if (woman > man) {
    console.log('YES')
  } else {
    console.log('NO')
  }
  if (woman === man + 1) {
    console.log('0')
  } else if (woman > man) {
    surplus = Math.abs(woman - man) - 1
    console.log(surplus)
  } else {
    surplus = Math.abs(woman - man) + 1
    console.log(surplus)
  }
});