| 比赛 | 寒假归来,刮刮油 | 评测结果 | AAAAAAAAAA |
|---|---|---|---|
| 题目名称 | 字符串加密 | 最终得分 | 100 |
| 用户昵称 | Aeons | 运行时间 | 0.017 s |
| 代码语言 | C++ | 内存使用 | 0.31 MiB |
| 提交时间 | 2016-02-25 20:29:30 | ||
#include <fstream>
using namespace std;
int main()
{
char ch[1001];
int i=0;
ifstream fin("strpassword.in");
ofstream fout("strpassword.out");
while(!fin.eof())
fin.get(ch,1000);
while(ch[i])
{
int n[8]={0,0,0,0,0,0,0,0},j=7;
ch[i]+=0;
while(ch[i]!=0)
{
n[j--]=ch[i]%2;
ch[i]/=2;
}
for(int j=0;j<8;j++)
fout<<n[j];
i++;
}
fin.close();
fout.close();
return 0;
}