| 记录编号 | 279397 | 评测结果 | AAAAAAAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 2134.字符串加密 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 0.002 s | ||
| 提交时间 | 2016-07-09 10:12:24 | 内存使用 | 0.30 MiB | ||
#include <fstream>
using namespace std;
ifstream fin("strpassword.in");
ofstream fout("strpassword.out");
int main() {
	char in;
	while(!fin.eof()) {
		in=fin.get();
		if(in=='\377') {
			break;
		}
		int array[8];
		for(int j=7;j>=0;j--) {
			array[j]=in%2;
			in=(in-in%2)/2;
		}
		for(int j=0;j<8;j++) {
			fout<<array[j];
		}
	}
	fin.close();
	fout.close();
	return 0;
}