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