1035. Password (20)
来源:互联网 发布:不写代码编程 编辑:程序博客网 时间:2024/06/10 13:32
1035. Password (20)
#include<stdio.h>#include<string.h>#include<malloc.h>struct stu{ char name[15]; char password[15]; int note;};int replace(char c[]);int main(){ int n,count=0,i; scanf("%d",&n); struct stu *s=(struct stu *)malloc(n*sizeof(struct stu)); for(i=0;i<n;i++) { scanf("%s %s",s[i].name,s[i].password); s[i].note=replace(s[i].password); if(s[i].note==1) { count++; } } if(count)printf("%d\n",count); for(i=0;i<n;i++) { if(s[i].note==1) { printf("%s %s\n",s[i].name,s[i].password); } } if(count==0) { if(n==1||n==0)printf("There is %d account and no account is modified",n); else printf("There are %d accounts and no account is modified",n); }}int replace(char c[]){ int i,note=0; for(i=0;i<strlen(c);i++) { if(c[i]=='1') { c[i]='@';note=1; } if(c[i]=='0') { c[i]='%';note=1; } if(c[i]=='l') { c[i]='L';note=1; } if(c[i]=='O') { c[i]='o';note=1; } } return note;}
0 0
- 1035. Password (20)
- 【PAT】1035. Password (20)
- 1035. Password (20)-PAT
- 1035. Password (20)
- 1035. Password (20)
- 1035. Password (20)
- PAT 1035. Password (20)
- 1035. Password (20)
- 1035. Password (20)
- 1035. Password (20)
- 1035. Password (20)
- 1035. Password (20)
- 1035. Password (20)
- 1035. Password (20)
- 1035. Password (20)
- 1035. Password (20)
- 1035. Password (20)
- pat 1035. Password (20)
- socket中的函数遇见EINTR的处理
- Bugly Android 应用升级 SDK 使用指南
- 常用工具类 (创建调试日志、创建时间戳、随机字符串)
- CAD制图中如何合并两条线为一条线
- iOS图片加载速度极限优化—FastImageCache解析
- 1035. Password (20)
- php html 模板输出 excel 例子
- wr703n刷openwrt智能控制--远程烟雾报警器
- leetcode算法——389. Find the Difference(基于JAVA)
- DataSet连接数据库
- php使用openssl来实现非对称加密
- OBS源码阅读笔记(四)--视频采集显示
- 设置Suse Linux的自启动脚本
- RPCA学习笔记