英语翻译The programming language Ada has integer constants that
来源:学生作业帮 编辑:作业帮 分类:英语作业 时间:2024/10/02 17:54:35
英语翻译
The programming language Ada has integer constants that look like this:123,8#123#,16#abc#.These constants represent the integers 123,83 (123 base 8) and 2739 (abc base 16).More precisely,an integer may be a decimal integer given as a sequence of one or more digits less than 10,or it may be an integer to some specific base,given as the base followed by a sequence of one or more digits less than the base enclosed by # symbols.Lower case letters from a through f are used as the digits representing 10 through 15.In Ada,the base,if specified,must be a sequence of decimal digits.For this problem,however,the base may be of any form described above so long as it represents an integer between 2 and 16 inclusive.
Input
The first line of input contains a positive integer n.n lines follow.
Output
For each line of input,output a line "yes" if it is a valid integer constant according to the above rules; otherwise output a line containing "no".Input lines contain no spaces and are between 1 and 80 characters in length.
Sample Input
5
2#101#
2#101##123#
17#abc#
16#123456789abcdef#
16#123456789abcdef#123456789abcdef#
Sample Output
yes
yes
no
yes
no
The programming language Ada has integer constants that look like this:123,8#123#,16#abc#.These constants represent the integers 123,83 (123 base 8) and 2739 (abc base 16).More precisely,an integer may be a decimal integer given as a sequence of one or more digits less than 10,or it may be an integer to some specific base,given as the base followed by a sequence of one or more digits less than the base enclosed by # symbols.Lower case letters from a through f are used as the digits representing 10 through 15.In Ada,the base,if specified,must be a sequence of decimal digits.For this problem,however,the base may be of any form described above so long as it represents an integer between 2 and 16 inclusive.
Input
The first line of input contains a positive integer n.n lines follow.
Output
For each line of input,output a line "yes" if it is a valid integer constant according to the above rules; otherwise output a line containing "no".Input lines contain no spaces and are between 1 and 80 characters in length.
Sample Input
5
2#101#
2#101##123#
17#abc#
16#123456789abcdef#
16#123456789abcdef#123456789abcdef#
Sample Output
yes
yes
no
yes
no
ada(一种编程语言)有两种整形常量如下:123,8#123#,16#abc#.这些常量表示整数123,83(八进制123),2739(16进制abc).严格的说:一个整形可以使一系列小于10的数字表示的十进制数,或是一个由符号#表示的x进制数.小写字母a到f表示十进制的10到15.进制数x的范围是2到16.
输入
第一行输入一个正数n.后面几行输入n行.
输出
对于每行输出,'yes'表示 此数按照以上规则合法.反之,'no'表示非法
输入数字在1到80字符之间.
输入例子
xxx
输出例子
xxxxx
输入
第一行输入一个正数n.后面几行输入n行.
输出
对于每行输出,'yes'表示 此数按照以上规则合法.反之,'no'表示非法
输入数字在1到80字符之间.
输入例子
xxx
输出例子
xxxxx
英语翻译The programming language Ada has integer constants that
英语翻译Crude Integer Programming.Recently,the U.S.Government be
英语翻译The programming language JAVA is the main teaching vehic
英语翻译C is a general-purpose computer programming language ori
英语翻译To assist in programming,the SR620 has 3 front panel sta
英语翻译The constants parameters obtained from single (RB21 and
Language-a word that has changed the world
英语翻译Complex programming has often detered manufactrers from
英语翻译The history of Chinese-language cinema has three separat
英语翻译The English language has become an international languag
英语翻译A perfect square is an integer that is the square of an
英语翻译1、Does the integer k have a factor p such that 1