Submission #67917338
Source Code Expand
function Main(inputText) {
/** @type {String[][]} - スペース区切りと改行区切りをそのまま2次元配列に変えた状態 */
const input = inputText.trim().split("\n").map(row => row.split(" "));
/* ==== 本体 ==== */
const S = input[0][0];
// .の列をoと(1個減らした).の列に変えれば終わりっぽそう
let result = "";
let isBright = false;
for (let i = 0; i < S.length; i++) {
if (S[i] === "#") {
result += "#";
isBright = false;
} else {
if (!isBright) {
result += "o";
isBright = true;
} else {
result += ".";
}
}
}
console.log(result);
}
/* ==== これを書かないといけないらしい ==== */
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
Submission Info
| Submission Time | |
|---|---|
| Task | B - 1D Akari |
| User | AXT_AyaKoto |
| Language | JavaScript (Node.js 18.16.1) |
| Score | 250 |
| Code Size | 890 Byte |
| Status | AC |
| Exec Time | 37 ms |
| Memory | 42760 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 250 / 250 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt |
| All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_handmade_00.txt, 01_handmade_01.txt, 01_handmade_02.txt, 01_handmade_03.txt, 01_handmade_04.txt, 01_handmade_05.txt, 01_handmade_06.txt, 02_random_00.txt, 02_random_01.txt, 02_random_02.txt, 02_random_03.txt, 02_random_04.txt, 02_random_05.txt, 02_random_06.txt, 02_random_07.txt, 02_random_08.txt, 02_random_09.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_00.txt | AC | 36 ms | 42756 KiB |
| 00_sample_01.txt | AC | 37 ms | 42664 KiB |
| 00_sample_02.txt | AC | 37 ms | 42640 KiB |
| 00_sample_03.txt | AC | 37 ms | 42760 KiB |
| 01_handmade_00.txt | AC | 37 ms | 42640 KiB |
| 01_handmade_01.txt | AC | 37 ms | 42712 KiB |
| 01_handmade_02.txt | AC | 37 ms | 42756 KiB |
| 01_handmade_03.txt | AC | 36 ms | 42612 KiB |
| 01_handmade_04.txt | AC | 37 ms | 42544 KiB |
| 01_handmade_05.txt | AC | 36 ms | 42748 KiB |
| 01_handmade_06.txt | AC | 37 ms | 42752 KiB |
| 02_random_00.txt | AC | 37 ms | 42700 KiB |
| 02_random_01.txt | AC | 37 ms | 42760 KiB |
| 02_random_02.txt | AC | 37 ms | 42468 KiB |
| 02_random_03.txt | AC | 37 ms | 42692 KiB |
| 02_random_04.txt | AC | 36 ms | 42676 KiB |
| 02_random_05.txt | AC | 36 ms | 42752 KiB |
| 02_random_06.txt | AC | 36 ms | 42640 KiB |
| 02_random_07.txt | AC | 36 ms | 42612 KiB |
| 02_random_08.txt | AC | 37 ms | 42480 KiB |
| 02_random_09.txt | AC | 36 ms | 42664 KiB |