結果
問題 | No.548 国士無双 |
ユーザー |
|
提出日時 | 2019-08-27 15:51:35 |
言語 | JavaScript (node v23.5.0) |
結果 |
AC
|
実行時間 | 56 ms / 2,000 ms |
コード長 | 557 bytes |
コンパイル時間 | 187 ms |
コンパイル使用メモリ | 6,696 KB |
実行使用メモリ | 39,552 KB |
最終ジャッジ日時 | 2024-10-13 01:25:25 |
合計ジャッジ時間 | 2,223 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
const inputStr = require("fs").readFileSync("/dev/stdin", "utf8") const alls = [ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm' ]; const inputs = inputStr.split("").filter(v => v !== "\n"); const removedDuplicates = Array.from(new Set(inputs)); if (removedDuplicates.length === 13) { console.log(alls.join("\n")) } else if (removedDuplicates.length === 12) { for (let c of alls) { if (!(removedDuplicates.includes(c))) { console.log(c) return; } } } else { console.log("Impossible") }