| 比赛 | 寒假归来,刮刮油 | 评测结果 | AAAAAAAAAA |
|---|---|---|---|
| 题目名称 | 字符串加密 | 最终得分 | 100 |
| 用户昵称 | WHZ0325 | 运行时间 | 0.020 s |
| 代码语言 | C++ | 内存使用 | 0.31 MiB |
| 提交时间 | 2016-02-25 20:14:53 | ||
#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;
}