正文
增加 6 行删除 1 行
1234567812 行未改动212223242526272829140 行未改动全部展开# 前言听说上回出的分支结构题很简单?这回难度怎么样(何意味)。# T1. Key-Check (密码检验)本题题目较简单,考察对于基本类型的变量的处理及对输入输出语句的灵活应用。12 行未改动## Idea 1:发现 `scanf` 的一种应用可以为 `scanf("%c;",&now)`,即读入时自动忽略 `;` 字符并正确读入 `now`。但是注意这样的读入在代码中不会停止,注意加上 `!=EOF` 的判断(以便程序在评测机上自动终止)。## Solution 1 (Code By [mengnn](https://www.luogu.com.cn/user/1391976)):```#include<bits/stdc++.h>140 行未改动全部展开1234567891011121312 行未改动262728293031323334140 行未改动全部展开# 前言听说上回出的分支结构题很简单?这回难度怎么样(何意味)。| 题目名 | 出题人 | 验题人 | 数据 | 题解 || :----------: | :----------: | :----------: | :----------: | :----------: || Key-Check (密码检验) | [SP_beyond_xxxx](https://www.luogu.com.cn/user/1317802) | [mengnn](https://www.luogu.com.cn/user/1391976) | [SP_beyond_xxxx](https://www.luogu.com.cn/user/1317802) | [SP_beyond_xxxx](https://www.luogu.com.cn/user/1317802) || Key-Decrypt (密码破译) | [mengnn](https://www.luogu.com.cn/user/1391976) | [SP_beyond_xxxx](https://www.luogu.com.cn/user/1317802) | [SP_beyond_xxxx](https://www.luogu.com.cn/user/1317802) | [mengnn](https://www.luogu.com.cn/user/1391976) |# T1. Key-Check (密码检验)本题题目较简单,考察对于基本类型的变量的处理及对输入输出语句的灵活应用。12 行未改动## Idea 1:发现 `scanf` 的一种应用可以为 `scanf("%c;",&now)`,即读入时自动忽略 `;` 字符并正确读入 `now`。但是注意这样的读入在代码中不会停止,注意加上 `!=EOF` 的判断(以便程序在读到输入结束时能终止循环)。## Solution 1 (Code By [mengnn](https://www.luogu.com.cn/user/1391976)):```#include<bits/stdc++.h>140 行未改动全部展开