Section 1.2 Name That Number
来源:互联网 发布:java简单迷宫算法 编辑:程序博客网 时间:2024/05/05 17:23
此题主要考察文件操作 由于数据量小 所以可以顺序查找 至于字母与数字的对应 可以直接打表
{
ID: yaoyuan4
PROG: namenum
LANG: PASCAL
}
Program namenum;
const
inf = 'namenum.in'; outf = 'namenum.out'; txt = 'dict.txt';
a : array['A'..'Z'] of char =
('2', '2', '2', '3', '3', '3',
'4', '4', '4', '5', '5', '5',
'6', '6', '6', '7', '0', '7',
'7', '8', '8', '8', '9', '9', '9', '0');
var
t : text;
s : string;
ans : longint;
Procedure init;
begin
assign(input, inf); reset(input);
readln(s);
close(input);
end;
Procedure work;
var
b, c : string;
i : longint;
flag : boolean;
begin
flag := true;
assign(t, txt); reset(t);
assign(output, outf); rewrite(output);
repeat
readln(t, b);
for i := 1 to length(b) do
c := c + a[b[i]];
if c = s then
begin
flag := false;
writeln(b);
end;
c := '';
until eof(t);
close(t);
if flag then writeln('NONE');
close(output);
end;
begin
init;
work;
end.
- Section 1.2 Name That Number
- Section 1.2 Name That Number
- USACO section 1.2 Name That Number
- USACO Section 1.2 Name That Number
- USACO section 1.2.3 Name That Number
- USCAO section 1.2 Name That Number
- USACO Section 1.2.4 Name That Number
- USACO Section 1.2 Name That Number
- USACO Section 1.2.3 Name That Number
- USACO Section 1.2 Name That Number
- USACO Section 1.2 Name That Number
- USACO Section 1.2 Name That Number
- USACO-Section 1.2 Name That Number[...]
- USCAO-Section 1.2 Name That Number
- USACO Section 1.2 Name That Number(全排列)
- USACO Training Section 1.2 Name That Number 解题报告&AC代码
- USACO 1.2-Name That Number
- 1.2.3 Name That Number
- SAP SCRIPT
- Trie Tree
- Linux command
- 硬盘安装linux
- OGRE的空间变换,translate()的陷阱!
- Section 1.2 Name That Number
- 如果你的Sniffer Pro也正确安装后不能使用,请进!
- 为 Linux 应用程序编写 DLL
- 超经典.经典~~A* 算法寻路!
- 事件(event)-19
- Linux常用命令查询
- VC进程相关的学习(二)(钩子基础)
- 事件接收与忽略-20
- android学习遇到的问题