[NICA #3] 数字显示屏

Luogu
IDLGB3900
Time1000ms
Memory512MB
DifficultyP2
O2优化字符串(入门)
有一块显示屏,显示着 $\{\verb!0!,\verb!1!,\verb!2!,\verb!3!,\verb!4!,\verb!5!,\verb!6!,\verb!7!,\verb!8!,\verb!9!\}$ 上的数字。每个数字都由如下图所示的字符画组成: ![](https://cdn.luogu.com.cn/upload/image_hosting/ngz0xckj.png) 现在给定显示屏上显示的内容,请输出上面显示的数字串。 ## Input 第一行有一个正整数 $n$,表示显示屏上显示的数字的个数。 接下来 $5$ 行描述显示屏。显示屏的宽度为 $5$,长度为 $4n-1$,上面显示的内容是数字串里的数字拼接起来的像素点。请参考输入样例理解输入格式。 ## Output 输出共一行 $n$ 个数字,表示显示屏上显示的数字。 [samples] ## Note ### 数据范围及约定 保证输入数据合法。 对于全部数据,$1\le n\le 10^4$。
Samples
Input #1
10
***.***.***.***.*.*.***.***...*.***.***
..*.*.*.*.*.*...*.*.*.....*...*...*.*.*
***.***.*.*.***.***.***...*...*.***.***
*.....*.*.*...*...*.*.*...*...*...*.*.*
***.***.***.***...*.***...*...*.***.***
Output #1
2905467138
Input #2
20
***.***.***.***.***.***.***.***...*.***.***.***.***.*.*.***.***.***.***.***.***
..*.*.*.*.....*.*.*.*.*.*...*.....*.*...*.*.*.*.*.*.*.*.*.*.*.....*.*.*.*.*.*..
..*.***.***.***.*.*.***.***.***...*.***.***.***.***.***.***.***.***.***.*.*.***
..*...*.*.*...*.*.*...*.*.*.*.*...*...*.*.*...*...*...*...*...*...*...*.*.*...*
..*.***.***.***.***.***.***.***...*.***.***.***.***...*.***.***.***.***.***.***
Output #2
79630966158994953905
API Response (JSON)
{
  "problem": {
    "name": "[NICA #3] 数字显示屏",
    "description": {
      "content": "有一块显示屏,显示着 $\\{\\verb!0!,\\verb!1!,\\verb!2!,\\verb!3!,\\verb!4!,\\verb!5!,\\verb!6!,\\verb!7!,\\verb!8!,\\verb!9!\\}$ 上的数字。每个数字都由如下图所示的字符画组成: ![](https://cdn.luogu.com.cn/upload/image_hosting/ngz0xckj.png) 现在给",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 524288
    },
    "difficulty": {
      "LuoguStyle": "P2"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGB3900"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "有一块显示屏,显示着 $\\{\\verb!0!,\\verb!1!,\\verb!2!,\\verb!3!,\\verb!4!,\\verb!5!,\\verb!6!,\\verb!7!,\\verb!8!,\\verb!9!\\}$ 上的数字。每个数字都由如下图所示的字符画组成:\n\n![](https://cdn.luogu.com.cn/upload/image_hosting/ngz0xckj.png)\n\n现在给...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments