POJ1002 487-3249
来源:互联网 发布:淘宝盗图被投诉怎么办 编辑:程序博客网 时间:2024/06/14 09:54
本题是一个明显的字符串处理问题,主要包含转换以及判重,只需注意细节即可,没有任何难度。
Program POJ1002;//by_poet_shyConst d:array['A'..'Z']of integer=(2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7,7,8,8,8,9,9,9,9); maxn=9999999;Var i,j,k :longint; s :string; a :array[0..maxn]of longint;Procedure Main;var bo:boolean;begin readln(k); for i:=1 to k do begin readln(s); j:=1; while j<=length(s) do begin if s[j]='-' then begin delete(s,j,1); continue;end; if ord(s[j])>=65 thens[j]:=chr(d[s[j]]+48); inc(j);end; val(s,j); inc(a[j]);end; bo:=false; for i:=0 to maxn do if a[i]>1 then begin str(i,s);while length(s)<7 do insert('0',s,1);write(copy(s,1,3));write('-');write(copy(s,4,4),' ');writeln(a[i]); bo:=true; end; if not bo then writeln('No duplicates.');end;//===========================================================BEGIN main;END.
- POJ1002 487-3249
- POJ1002·487-3279
- POJ1002 487-3279
- POJ1002 487-3279
- POJ1002--487-3279
- poj1002 487-3279
- poj1002 487-3279
- POJ1002 487-3279
- poj1002 487-3279
- poj1002 487-3279(哈希)
- POJ1002 487-3279
- POJ1002--487-3279 翻译
- [c]poj1002 487-3279
- 【poj1002】487-3279
- POJ1002 487-3279
- poj1002 487-3279
- POJ1002 487-3279
- POJ1002 487-3279
- zoj 1671 Walking Ant (BFS)
- 数字翻译器及其实现
- 敏捷开发中的Code Review
- HTML5的进步与优势
- android,ExpandableList,将被选中的group置于顶端
- POJ1002 487-3249
- nyoj 367 Reward
- 正则表达式匹配文件内容,并打印匹配的行号
- shellcode检测——libemu原理分析
- 无法分析从服务器收到的消息。之所以出现此错误,常见的原因是: 在通过调用 Response.Write() 修改响应时,将启用响应筛选器、HttpModule 或服务器跟踪
- HDU/HDOJ 1024 The Max Sum Plus Plus
- Java的小项目 秒表
- qtp右键怎么实现啊
- BAPI_ASSET_RETIREMENT_POST 固定资产报废 BAPI