(fileName: string)
| 61 | } |
| 62 | |
| 63 | function fixFileName(fileName: string) { |
| 64 | if (fileName.endsWith('.in') || fileName.endsWith('.out')) { |
| 65 | const dotAt = fileName.lastIndexOf('.'); |
| 66 | const name = fileName.slice(0, dotAt); |
| 67 | const suffix = fileName.slice(dotAt + 1); |
| 68 | if (!/[0-9]/.test(name)) { |
| 69 | fileName = `${name}0.${suffix}`; |
| 70 | } |
| 71 | } |
| 72 | return fileName.replace(/[\\/?#~!|*]/g, '_'); |
| 73 | } |
| 74 | |
| 75 | async function iterate( |
| 76 | count: bigint | number, step: bigint | number, cb: (pageId: bigint) => Promise<void>, |