結果
問題 | No.69 文字を自由に並び替え |
ユーザー |
![]() |
提出日時 | 2017-06-28 22:28:33 |
言語 | JavaScript (node v23.5.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 442 bytes |
コンパイル時間 | 49 ms |
コンパイル使用メモリ | 5,376 KB |
実行使用メモリ | 39,808 KB |
最終ジャッジ日時 | 2024-10-13 00:13:55 |
合計ジャッジ時間 | 1,630 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 15 |
ソースコード
function Main(input) { var line = input.split("\n"); var A = +line[0]; var B = +line[1]; var res = ""; if (A.length != B.length) { res = "NO" } for (var i = 0; i < A.length; i = i + 1) { indexSum += B.indexof(A[i]); elemSum += i; B[i] = null; } res = (indexSum == elemSum) ? "YES" : "NO"; console.log(res); } Main(require("fs").readFileSync("/dev/stdin", "utf8"))