编程介的小学生 2017-10-02 15:38 采纳率: 20.5%
浏览 773
已采纳

AT – sequence

Description

AT-sequences are command strings used to control modems. An AT-sequence is a string of no more than 500 characters consisting of the prefix 'AT' followed by some commands immediately one after another without any separators. Here is a simplified description of the modem commands.

Each command consists of a header and an optional numeric value (non-negative integer containing no more than 4 digits). If there is a value in the command, it is separated from the header by the character '='.

The header itself also consists of two parts. The first, mandatory, part of a header has one of the following forms:

one or two upper-case Latin letters;
one of the symbols '&', '#', '@', followed by one upper-case Latin letter.
The second, optional part of a header is a non-negative integer containing no more than 20 digits.

Spaces are not allowed in the command notation. If the command notation contains only one or two Latin letters, this command can't precede another one with the notation started by a letter.

The task is to determine all commands included in the structure of a correct AT-sequence.

Input

The input contains one line with the source AT-sequence.

Output

Each line of the output contains one command from the AT-sequence given in the input file. The commands must be listed in the same order as in the AT-sequence. If AT-sequence have no commands you must generate nothing.

Sample Input

ATDP2934564&H0S0=4
Sample Output

DP2934564
&H0
S0=4

  • 写回答

1条回答 默认 最新

  • threenewbee 2017-10-17 17:17
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿