freopen

#include<iostream>
using namespace std;
int main(){
	freopen("in.txt","r",stdin);
	freopen("out.txt","w",stdout);
	string s;
	cin>>s;
	int a;
	int b[7];
	for(int i=0;i<s.size();i++){
		a=s[i];
		for(int j=0;a!=0;j++){
			b[j]=a%2;
			a/=2;
		}
		for(int i=6;i>=0;i--){
			cout<<b[i];
		}
		cout<<endl;
	}
	return 0;
}

  

posted @ 2024-07-29 14:53  陈若麟  阅读(9)  评论(0编辑  收藏  举报