結果

問題 No.337 P versus NP
ユーザー megane_anko
提出日時 2021-02-14 01:45:56
言語 TypeScript
(5.7.2)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 527 bytes
コンパイル時間 9,066 ms
コンパイル使用メモリ 229,820 KB
実行使用メモリ 41,580 KB
最終ジャッジ日時 2024-12-31 16:25:10
合計ジャッジ時間 10,198 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

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

const arr = input.split(/[ \n]/);
let N = parseInt(arr[0]);
let P = parseInt(arr[1]);

// if (N === 0 && P === 0) {
//     console.log("=");
// } else if ( N !== 0 && P === 0) {
//     console.log("=");
// } else if (N === 1 && P !== 0) {
//     console.log("=");
// } else if (N === 0 && P !== 0) {
//     console.log("!=");
// } else {
//     console.log("!=");
// }
if (P === N * P) {
    console.log("=")
  }
  else {
    console.log("!=")
  }
0