<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>지환태</title>
		<link>http://zfanta.com/</link>
		<description>지환태의 헛질 블로그</description>
		<language>ko</language>
		<pubDate>Sat, 21 Apr 2012 23:10:56 +0900</pubDate>
		<generator>Tistory 1.1 (http://www.tistory.com/)</generator>
		<managingEditor>　환타</managingEditor>
		<image>
			<title>지환태</title>
			<url>http://cfs4.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczQudGlzdG9yeS5jb206L2F0dGFjaC8wLzEzMDAwMDAwMDAwMC5naWY%3D</url>
			<link>http://zfanta.com</link>
			<description>지환태의 헛질 블로그</description>
		</image>
		<item>
			<title>블로그 다시 시작</title>
			<link>http://zfanta.com/entry/%EB%B8%94%EB%A1%9C%EA%B7%B8-%EB%8B%A4%EC%8B%9C-%EC%8B%9C%EC%9E%91</link>
			<description>&lt;p&gt;작심삼일도 100번 하면 1년.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;clear: none; float: none; text-align: left; &quot;&gt;&lt;b&gt;한양대학교 화이팅~&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left; clear: none; float: none; &quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display:inline-block;width:454px;&quot;&gt;&lt;a href=&quot;http://cfile29.uf.tistory.com/original/14165D3F4F92ADB52CA2CC&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfile29.uf.tistory.com/image/14165D3F4F92ADB52CA2CC&quot; filemime=&quot;image/jpeg&quot; filename=&quot;화이팅.png&quot; height=&quot;232&quot; style=&quot;&quot; width=&quot;454&quot;/&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;entry-ccl&quot; style=&quot;clear: both; text-align: right; margin-bottom: 10px&quot;&gt;
	&lt;img id=&quot;ccl-icon-475-0&quot; class=&quot;entry-ccl-by&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png&quot; alt=&quot;저작자 표시&quot;/&gt;
	&lt;img id=&quot;ccl-icon-475-1&quot; class=&quot;entry-ccl-nc&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png&quot; alt=&quot;비영리&quot;/&gt;
	&lt;img id=&quot;ccl-icon-475-2&quot; class=&quot;entry-ccl-nd&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black03.png&quot; alt=&quot;변경 금지&quot;/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
		&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-nd/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;
			&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/475&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>뻘소리</category>
			<category>블로그</category>
			<author>　환타</author>
			<guid>http://zfanta.com/475</guid>
			<comments>http://zfanta.com/entry/%EB%B8%94%EB%A1%9C%EA%B7%B8-%EB%8B%A4%EC%8B%9C-%EC%8B%9C%EC%9E%91#entry475comment</comments>
			<pubDate>Sat, 21 Apr 2012 21:55:09 +0900</pubDate>
		</item>
		<item>
			<title>정봉혁이 조윤희를 좋아합니다.</title>
			<link>http://zfanta.com/entry/%EC%A0%95%EB%B4%89%ED%98%81%EC%9D%B4-%EC%A1%B0%EC%9C%A4%ED%9D%AC%EB%A5%BC-%EC%A2%8B%EC%95%84%ED%95%A9%EB%8B%88%EB%8B%A4</link>
			<description>&lt;br /&gt;
레얼&lt;div class=&quot;entry-ccl&quot; style=&quot;clear: both; text-align: right; margin-bottom: 10px&quot;&gt;
	&lt;img id=&quot;ccl-icon-472-0&quot; class=&quot;entry-ccl-by&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png&quot; alt=&quot;저작자 표시&quot;/&gt;
	&lt;img id=&quot;ccl-icon-472-1&quot; class=&quot;entry-ccl-nc&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png&quot; alt=&quot;비영리&quot;/&gt;
	&lt;img id=&quot;ccl-icon-472-2&quot; class=&quot;entry-ccl-nd&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black03.png&quot; alt=&quot;변경 금지&quot;/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
		&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-nd/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;
			&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/472&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>뻘소리</category>
			<author>　환타</author>
			<guid>http://zfanta.com/472</guid>
			<comments>http://zfanta.com/entry/%EC%A0%95%EB%B4%89%ED%98%81%EC%9D%B4-%EC%A1%B0%EC%9C%A4%ED%9D%AC%EB%A5%BC-%EC%A2%8B%EC%95%84%ED%95%A9%EB%8B%88%EB%8B%A4#entry472comment</comments>
			<pubDate>Tue, 01 Mar 2011 10:45:48 +0900</pubDate>
		</item>
		<item>
			<title>bigint 수정</title>
			<link>http://zfanta.com/entry/bigint-%EC%88%98%EC%A0%95</link>
			<description>&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 2px; margin-right: 2px; width: 696px; margin-top: 2px; margin-bottom: 2px; height: 631px; &quot;&gt;
#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;string&gt;  
#include &lt;stdlib.h&gt;
#include &lt;stdio.h&gt;
#include &lt;memory.h&gt;
#include &lt;time.h&gt;

#pragma warning(disable:4996)

class bigint
{
private:
	char sign;		//+:0, -:1					
	unsigned *dats;	//가장 뒷자리가 dats[0]에 저장
	unsigned len;	//dats배열 길이

public:
	unsigned cona2u(char*);

	bigint();
	~bigint();
	bigint(const int);
	bigint(const unsigned);
	bigint(const char*);
	bigint(const bigint &amp;);

	unsigned resize(unsigned);	//길이조절
	unsigned resize();			//앞의 0 지우기
	bigint abs();				//절대값
	bigint negative(unsigned);	//1의보수	

	int cmp(bigint &amp;b);			//strcmp와 리턴값 같음

	bigint _or(bigint &amp;b);		//this에 저장
	bigint _and(bigint &amp;b);		//this에 저장
	bigint _xor(bigint &amp;b);		//this에 저장
	bigint shr(unsigned n);		//this에 (this&gt;&gt;n)을 저장
	bigint shl(unsigned n);		//this에 (this&lt;&lt;n)을 저장	

	bigint add(bigint &amp;b);		//(this+b)를 리턴
	bigint sub(bigint &amp;b);		//(this-b)를 리턴
	bigint mul(bigint &amp;b);		//(this*b)를 리턴
	bigint div(bigint &amp;b, int);	//(this/b)또는 (this%b)리턴

	std::string conbcd();		//10진

	bigint operator=(const int);
	bigint operator=(const bigint &amp;);
	bigint operator=(const char*);

	friend bigint operator-(bigint);

	friend bigint operator|(bigint, bigint);
	friend bigint operator&amp;(bigint, bigint);
	friend bigint operator^(bigint, bigint);
	friend bigint operator+(bigint, bigint);
	friend bigint operator-(bigint, bigint);
	friend bigint operator*(bigint, bigint);
	friend bigint operator/(bigint, bigint);
	friend bigint operator%(bigint, bigint);
	friend bigint operator&lt;&lt;(bigint, bigint);
	friend bigint operator&gt;&gt;(bigint, bigint);

	friend bool operator&lt;(bigint, bigint);
	friend bool operator&lt;=(bigint, bigint);
	friend bool operator&gt;(bigint, bigint);
	friend bool operator&gt;=(bigint, bigint);
	friend bool operator==(bigint, bigint);
	friend bool operator!=(bigint, bigint);

	bigint operator|=(bigint);
	bigint operator&amp;=(bigint);
	bigint operator^=(bigint);
	bigint operator+=(bigint);
	bigint operator-=(bigint);
	bigint operator*=(bigint);
	bigint operator/=(bigint);
	bigint operator%=(bigint);
	bigint operator&lt;&lt;=(bigint);
	bigint operator&gt;&gt;=(bigint);

	bigint operator++();
	bigint operator++(int dummy);
	bigint operator--();
	bigint operator--(int dummy);

	friend std::ostream&amp; operator &lt;&lt;( std::ostream&amp; os, bigint&amp; b );
	friend std::istream&amp; operator &gt;&gt;( std::istream&amp; is, bigint&amp; b );
};

unsigned bigint::cona2u(char *src)
{
	unsigned ten, sum, eos=strlen(src)-1;

	for(sum=0, ten=1; (int)eos&gt;=0 &amp;&amp; ten&lt;=100000000; ten*=10, eos--)
	{
		sum+=ten*(src[eos]-'0');
		src[eos]=0;
	}
	return sum;
}

bigint::bigint()
{
	len=1;
	sign=0;
	dats=(unsigned*)calloc(1,sizeof(unsigned));
}

bigint::~bigint()
{
	free(dats);
}

bigint::bigint(const int src)
{
	len=1;
	dats=(unsigned*)malloc(sizeof(unsigned)*len);
	if(src&lt;0)
	{
		sign=1;
		dats[0]=-src;
	}
	else
	{
		sign=0;
		dats[0]=src;
	}
}

bigint::bigint(const char *src)
{
	char *str=(char*)malloc(sizeof(char)*(strlen(src)+1));

	sign=0;
	strcpy(str, src);
	if(src[0]=='-')
		strcpy(str,src+1), sign=1;
	if(src[0]=='+')
		strcpy(str,src+1);

	len=(strlen(src)-1)/9 + 1;
	dats=(unsigned*)malloc(sizeof(unsigned)*len);
	unsigned i;
	for(i=0; i&lt;len; i++)
	{
		dats[i]=cona2u(str);
	}
	free(str);
	shl(len*32);

	unsigned j, lmt=len/2;
	for(i=(len/2)*32; i; i--)
	{
		shr(1);
		for(j=len-1; j&gt;=lmt; j--)
		{
			if(dats[j]&gt;=2147483648)
				dats[j]-=1647483648;
		}
	}
}

bigint::bigint(const bigint &amp;src)
{
	len=src.len;
	sign=src.sign;
	dats=(unsigned*)malloc(sizeof(unsigned)*len);
	memcpy(dats, src.dats, sizeof(unsigned)*len);
}

unsigned bigint::resize(unsigned len_new)
{
	if(len==len_new)
		return len;
	unsigned *new_p=(unsigned*)malloc(sizeof(unsigned)*len_new);		//
	memcpy(new_p, dats, sizeof(unsigned)*((len&lt;len_new)?len:len_new));	//이부분에 realloc(dats, sizeof(unsigned)*len_new)쓰면 왜 값이 바뀌나요
	free(dats);															//
	dats=new_p;															//

	if(len &lt; len_new)
		memset(dats+len, 0, sizeof(unsigned)*(len_new-len));
	len=len_new;
	return len;
}

unsigned bigint::resize()
{
	unsigned i;
	for(i=len-1; dats[i]==0; i--);
	i++;
	if(i)
		resize(i);
	else
		resize(1);
	return len;
}

bigint bigint::abs()
{
	bigint toreturn(*this);
	toreturn.sign=0;
	return toreturn;
}

//1의 보수
bigint bigint::negative(unsigned len_new)
{
	bigint toreturn(*this);
	toreturn.resize(len_new);
	for(unsigned i=0; i&lt;len_new; i++)
		toreturn.dats[i]=~toreturn.dats[i];
	return toreturn;
}

int bigint::cmp(bigint &amp;b)
{
	if(len==1 &amp;&amp; b.len==1 &amp;&amp; dats[0]==0 &amp;&amp; b.dats[0]==0)
		return 0;
	if(sign==1 &amp;&amp; b.sign==0)
		return -1;
	if(sign==0 &amp;&amp; b.sign==1)
		return 1;

	int left=1, right=-1;	
	if(sign==1 &amp;&amp; b.sign==1)
		left=-1, right=1;

	if(len&gt;b.len)
		return left;
	if(len&lt;b.len)
		return right;

	for(int i=len-1; i&gt;=0; i--)
	{
		if(dats[i]&gt;b.dats[i])
			return left;
		if(dats[i]&lt;b.dats[i])
			return right;
	}
	return 0;
}

bigint bigint::_or(bigint &amp;b)
{
	if(len&lt;b.len)
		resize(b.len);
	unsigned i;
	for(i=0; i&lt;b.len; i++)
		dats[i]|=b.dats[i];
	return *this;
}

bigint bigint::_and(bigint &amp;b)
{
	if(len&lt;b.len)
		resize(b.len);
	unsigned i;
	for(i=0; i&lt;b.len; i++)
		dats[i]&amp;=b.dats[i];
	return *this;
}

bigint bigint::_xor(bigint &amp;b)
{
	if(len&lt;b.len)
		resize(b.len);
	unsigned i;
	for(i=0; i&lt;b.len; i++)
		dats[i]^=b.dats[i];
	return *this;
}

bigint bigint::shr(unsigned n)
{
	unsigned move=n&gt;&gt;5, cut=n&amp;31, i, j, tmp;
	dats[0]=dats[move]&gt;&gt;cut;
	for(i=1; i&lt;len-move; i++)
	{
		for(j=0, tmp=dats[i+move]; j&lt;32-cut; j++)	//dats[i+1]=dats[i+1]|(dats[i+move]&lt;&lt;(32-cut));
			tmp&lt;&lt;=1;								//
		dats[i-1]|=tmp;
		dats[i]=dats[i+move]&gt;&gt;cut;  
	}


	resize(len-move);//옮겨진 부분 삭제
	resize();
	return *this;
}

bigint bigint::shl(unsigned n)
{
	unsigned move=n&gt;&gt;5, cut=n&amp;31, i, j, tmp;

	resize(len+move+1);
	dats[len-1]=dats[len-move-1]&lt;&lt;cut;
	for(i=len-2; (int)i&gt;=(int)move; i--)
	{
		for(j=0, tmp=dats[i-move]; j&lt;32-cut; j++)	//dats[i+1]=dats[i+1]|(dats[i-move]&gt;&gt;(32-cut));
			tmp&gt;&gt;=1;								//
		dats[i+1]=dats[i+1]|tmp;					//
		dats[i]=dats[i-move]&lt;&lt;cut;
	}
	memset(dats, 0, sizeof(unsigned)*move);//뒤에 옮겨진 부분 0으로

	resize();
	return *this;
}

bigint bigint::add(bigint &amp;b)
{
	bigint toreturn=*this;
	long long carry=0;
	unsigned i;
	toreturn.resize( ((b.len&gt;toreturn.len)?b.len:toreturn.len) + 1 );

	for(i=0; i&lt;b.len; i++)
	{
		carry = (long long)toreturn.dats[i] + (long long)b.dats[i] + carry;
		toreturn.dats[i]=carry&amp;(((long long)1&lt;&lt;32)-1);
		carry&gt;&gt;=32;
	}

	for(; carry; i++)
	{
		carry=(long long)toreturn.dats[i] + carry;
		toreturn.dats[i]=carry&amp;(((long long)1&lt;&lt;32)-1);
		carry&gt;&gt;=32;
	}

	toreturn.resize();

	return toreturn;
}

//1의 보수 사용
bigint bigint::sub(bigint &amp;b)
{
	bigint toreturn(*this);
	bigint subtrahend(b);	//감수

	unsigned len_new=((toreturn.len&gt;b.len)?toreturn.len:b.len);
	subtrahend=subtrahend.negative(len_new);

	toreturn=toreturn.add(subtrahend);
	if(toreturn.len &gt; len_new)//자리올림수있으면
	{
		toreturn.resize(len_new);
		toreturn=toreturn.add((bigint)1);
	}
	else//자리올림수 없으면
	{
		toreturn=toreturn.negative(len_new);
		toreturn.sign=1;
	}
	return toreturn;
}

bigint bigint::mul(bigint &amp;b)
{
	bigint result, tmp;
	unsigned i, j;
	unsigned long long carry;
	for(i=0; i&lt;b.len; i++)
	{
		tmp.resize(len+1+i);
		for(carry=j=0; j&lt;len; j++)
		{
			carry=(long long)dats[j]*(long long)b.dats[i]+carry;
			tmp.dats[j+i]=(unsigned)carry&amp;(((long long)1&lt;&lt;32)-1);
			carry&gt;&gt;=32;
		}
		tmp.dats[j+i]=(unsigned)carry;
		result=result.add(tmp);
		memset(tmp.dats, 0, sizeof(unsigned)*tmp.len);
	}
	result.resize();
	return result;	
}

bigint bigint::div(bigint &amp;b, int ask_mod=0)
{
	bigint r=abs(), q=0, divisor=b.abs(), one=1;
	unsigned i;

	for(i=0;divisor.cmp(r)&lt;=0;divisor.shl(1),i++);
	i--;
	if((int)i&gt;=0)
	{
		one.shl(i);
		divisor.shr(1);

		while(b.cmp(r)&lt;=0)//b&lt;=r
		{
			for(;divisor.cmp(r)&gt;0;divisor.shr(1),one.shr(1));
			q._or(one);
			r=r.sub(divisor);
		}
	}

	if(ask_mod)
		return r;
	return q;
}

std::string bigint::conbcd()
{
	unsigned *bcd, len_new, head, i, j;
	char  str_tmp[10];
	std::string result;

	len_new=10704*len/10000+1+len;

	bcd=(unsigned*)calloc(len_new, sizeof(unsigned));
	memcpy(bcd, dats, sizeof(unsigned)*len);

	for(head=len, i=0; i&lt;32*len; i++)
	{
		for(j=head; j&gt;=len; j--)
		{
			if(bcd[j]&gt;=500000000)
				bcd[j]+=1647483648;
		}
		if(bcd[head]&gt;&gt;31)
			head++;
		bcd[head]&lt;&lt;=1;
		for(j=head-1; (int)j&gt;=0; j--)
		{
			bcd[j+1]|=(bcd[j]&gt;&gt;31);
			bcd[j]&lt;&lt;=1;
		}		
	}

	for(i=len_new-1; bcd[i]==0; i--);

	if((int)i&lt;0)
	{
		result=&quot;0&quot;;
		return result;
	}

	sprintf(str_tmp, &quot;%u&quot;, bcd[i]);
	result.insert(result.size(), str_tmp);

	for(--i; (int)i&gt;=len; i--)
	{
		sprintf(str_tmp, &quot;%09u&quot;, bcd[i]);
		result.insert(result.size(), str_tmp);
	}

	free(bcd);
	return result;
}

bigint bigint::operator=(const int src)
{
	resize(1);
	sign=0;	
	dats[0]=src;
	if(src&lt;0)
		sign=1, dats[0]*=-1;
	return *this;
}

bigint bigint::operator=(const bigint &amp;src)
{
	resize(src.len);
	sign=src.sign;
	memcpy(dats, src.dats, sizeof(unsigned)*len);
	return *this;
}

bigint bigint::operator=(const char *src)
{
	char *str=(char*)malloc(sizeof(char)*(strlen(src)+1));

	sign=0;
	strcpy(str, src);
	if(src[0]=='-')
		strcpy(str,src+1), sign=1;
	if(src[0]=='+')
		strcpy(str,src+1);

	resize((strlen(src)-1)/9 + 1);
	unsigned i;
	for(i=0; i&lt;len; i++)
	{
		dats[i]=cona2u(str);
	}
	free(str);
	shl(len*32);

	unsigned j, lmt=len/2;
	for(i=(len/2)*32; i; i--)
	{
		shr(1);
		for(j=len-1; j&gt;=lmt; j--)
		{
			if(dats[j]&gt;=2147483648)
				dats[j]-=1647483648;
		}
	}

	return *this;
}

bigint operator-(bigint a)
{
	a.sign^=1;
	return a;
}

bigint operator|(bigint a, bigint b)
{
	return a._or(b);
}

bigint operator&amp;(bigint a, bigint b)
{
	return a._and(b);
}

bigint operator^(bigint a, bigint b)
{
	return a._xor(b);
}

bigint operator+(bigint a, bigint b)
{
	if(a.sign==b.sign)
		return a.add(b);
	if(a.sign==0 &amp;&amp; b.sign==1)
		return a.sub(b);
	//a.sign==1 &amp;&amp; b.sign==0
	return b.sub(a);
}

bigint operator-(bigint a, bigint b)
{
	if(a.sign==1 &amp;&amp; b.sign==1)
	{
		b.sign=0;
		if((a.abs()).cmp(b.abs())==1)
			b.sign=1;
		b=b.sub(a);
		return b;
	}
	if(a.sign==0 &amp;&amp; b.sign==0)
		return a.sub(b);
	if(a.sign==0 &amp;&amp; b.sign==1)
		return a.add(b);
	//a.sign==1 &amp;&amp; b.sign==0
	a=a.add(b);
	a.sign=1;
	return a;
}

bigint operator*(bigint a, bigint b)
{
	bigint toreturn=a.mul(b);
	toreturn.sign=a.sign^b.sign;
	return toreturn;
}

bigint operator/(bigint a, bigint b)
{
	bigint toreturn=a.abs().div(b.abs());
	toreturn.sign=a.sign^b.sign;
	return toreturn;
}

bigint operator%(bigint a, bigint b)
{
	bigint toreturn=a.abs().div(b.abs(),1);
	toreturn.sign=a.sign;
	return toreturn;
}

bigint operator&lt;&lt;(bigint a, bigint b)
{
	bigint tmp(2147483647);
	while(b.len&gt;1)
	{
		a.shl(2147483647);
		b=b.sub(tmp);
	}
	a.shl(b.dats[0]);
	return a;
}

bigint operator&gt;&gt;(bigint a, bigint b)
{
	bigint tmp(2147483647);
	while(b.len&gt;1)
	{
		a.shr(2147483647);
		b=b.sub(tmp);
	}
	a.shr(b.dats[0]);
	return a;
}

bool operator&lt;(bigint a, bigint b)
{
	if(a.cmp(b)&lt;0)
		return true;
	return false;
}

bool operator&lt;=(bigint a, bigint b)
{
	if(a.cmp(b)&lt;=0)
		return true;
	return false;
}

bool operator&gt;(bigint a, bigint b)
{
	if(a.cmp(b)&gt;0)
		return true;
	return false;
}

bool operator&gt;=(bigint a, bigint b)
{
	if(a.cmp(b)&gt;=0)
		return true;
	return false;
}

bool operator==(bigint a, bigint b)
{
	if(a.cmp(b)==0)
		return true;
	return false;
}

bool operator!=(bigint a, bigint b)
{
	if(a.cmp(b)==0)
		return false;
	return true;
}

bigint bigint::operator|=(bigint b)
{
	*this=*this|b;
	return *this;
}

bigint bigint::operator&amp;=(bigint b)
{
	*this=*this&amp;b;
	return *this;
}
bigint bigint::operator^=(bigint b)
{
	*this=*this^b;
	return *this;
}

bigint bigint::operator+=(bigint b)
{
	*this=*this+b;
	return *this;
}

bigint bigint::operator-=(bigint b)
{
	*this=*this-b;
	return *this;
}

bigint bigint::operator*=(bigint b)
{
	*this=*this*b;
	return *this;
}

bigint bigint::operator/=(bigint b)
{
	*this=*this/b;
	return *this;
}

bigint bigint::operator%=(bigint b)
{
	*this=*this%b;
	return *this;
}

bigint bigint::operator&lt;&lt;=(bigint b)
{
	*this=*this&lt;&lt;b;
	return *this;
}

bigint bigint::operator&gt;&gt;=(bigint b)
{
	*this=*this&gt;&gt;b;
	return *this;
}

bigint bigint::operator++()
{
	*this+=1;
	return *this;
}

bigint bigint::operator++(int dummy)
{
	bigint old(*this);
	*this+=1;
	return old;
}

bigint bigint::operator--()
{
	*this-=1;
	return *this;
}

bigint bigint::operator--(int dummy)
{
	bigint old(*this);
	*this-=1;
	return old;
}

std::ostream&amp; operator&lt;&lt;(std::ostream&amp; os, bigint&amp; b)
{
	os&lt;&lt;((b.sign)?&quot;-&quot;:&quot;&quot;)&lt;&lt;b.conbcd();

	return os;
}

std::istream&amp; operator&gt;&gt;(std::istream&amp; is, bigint&amp; b)
{
	std::string numstr;
	is&gt;&gt;numstr;
	b=numstr.c_str();

	return is;
}

bigint fac(bigint n)  
{
	bigint result=1;
	for(; n&gt;0; n--)
		result*=n;

	return result;
}

int main()
{
	clock_t start, end;
	std::ofstream fout;
	fout.open(&quot;result.txt&quot;);

	bigint n=1;

	std::cout&lt;&lt;&quot;&gt;&quot;;
	std::cin&gt;&gt;n;
	while(n&gt;0)
	{
		start=clock();

		fout&lt;&lt;n&lt;&lt;&quot;!:\n&quot;;
		fout&lt;&lt;fac(n)&lt;&lt;'\n';

		end=clock();
		fout&lt;&lt;(double)(end-start) / CLOCKS_PER_SEC&lt;&lt;&quot;sec\n&quot;;

		std::cout&lt;&lt;&quot;&gt;&quot;;
		std::cin&gt;&gt;n;
	}

	return 0;
}
&lt;/textarea&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;
나눗셈에 오류가 있었습니다.&lt;/div&gt;
&lt;div&gt;bcd도 고쳤고&lt;/div&gt;&lt;div class=&quot;entry-ccl&quot; style=&quot;clear: both; text-align: right; margin-bottom: 10px&quot;&gt;
	&lt;img id=&quot;ccl-icon-469-0&quot; class=&quot;entry-ccl-by&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png&quot; alt=&quot;저작자 표시&quot;/&gt;
	&lt;img id=&quot;ccl-icon-469-1&quot; class=&quot;entry-ccl-nc&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png&quot; alt=&quot;비영리&quot;/&gt;
	&lt;img id=&quot;ccl-icon-469-2&quot; class=&quot;entry-ccl-nd&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black03.png&quot; alt=&quot;변경 금지&quot;/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
		&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-nd/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;
			&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/469&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>bigint</category>
			<category>bigint</category>
			<author>　환타</author>
			<guid>http://zfanta.com/469</guid>
			<comments>http://zfanta.com/entry/bigint-%EC%88%98%EC%A0%95#entry469comment</comments>
			<pubDate>Mon, 01 Feb 2010 18:34:14 +0900</pubDate>
		</item>
		<item>
			<title>c++ bigint class완성</title>
			<link>http://zfanta.com/entry/c-bigint-class%EC%99%84%EC%84%B1</link>
			<description>&lt;div&gt;
&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;-webkit-monospace&quot; size=&quot;3&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: normal;&quot;&gt;적분형님따라 만든 bigint&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 714px; margin-top: 1px; margin-bottom: 1px; height: 12101px; &quot;&gt;
#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;string&gt;  
#include &lt;stdlib.h&gt;
#include &lt;stdio.h&gt;
#include &lt;memory.h&gt;
#include &lt;time.h&gt;

#pragma warning(disable:4996)

class bigint
{
private:
	char sign;		//+:0, -:1					
	unsigned *dats;	//가장 뒷자리가 dats[0]에 저장
	unsigned len;	//dats배열 길이

public:
	unsigned cona2u(char*);

	bigint();
	~bigint();
	bigint(const int);
	bigint(const unsigned);
	bigint(const char*);
	bigint(const bigint &amp;);

	unsigned resize(unsigned);	//길이조절
	unsigned resize();			//앞의 0 지우기
	bigint abs();				//절대값
	bigint negative(unsigned);	//1의보수	

	int cmp(bigint &amp;b);			//strcmp와 리턴값 같음

	bigint _or(bigint &amp;b);		//this에 저장
	bigint _and(bigint &amp;b);		//this에 저장
	bigint _xor(bigint &amp;b);		//this에 저장
	bigint shr(unsigned n);		//this에 (this&gt;&gt;n)을 저장
	bigint shl(unsigned n);		//this에 (this&lt;&lt;n)을 저장	

	bigint add(bigint &amp;b);		//(this+b)를 리턴
	bigint sub(bigint &amp;b);		//(this-b)를 리턴
	bigint mul(bigint &amp;b);		//(this*b)를 리턴
	bigint div(bigint &amp;b, int);	//(this/b)또는 (this%b)리턴

	std::string conbcd();		//10진

	bigint operator=(const int);
	bigint operator=(const bigint &amp;);
	bigint operator=(const char*);

	friend bigint operator-(bigint);

	friend bigint operator|(bigint, bigint);
	friend bigint operator&amp;(bigint, bigint);
	friend bigint operator^(bigint, bigint);
	friend bigint operator+(bigint, bigint);
	friend bigint operator-(bigint, bigint);
	friend bigint operator*(bigint, bigint);
	friend bigint operator/(bigint, bigint);
	friend bigint operator%(bigint, bigint);
	friend bigint operator&lt;&lt;(bigint, bigint);
	friend bigint operator&gt;&gt;(bigint, bigint);

	friend bool operator&lt;(bigint, bigint);
	friend bool operator&lt;=(bigint, bigint);
	friend bool operator&gt;(bigint, bigint);
	friend bool operator&gt;=(bigint, bigint);
	friend bool operator==(bigint, bigint);
	friend bool operator!=(bigint, bigint);

	bigint operator|=(bigint);
	bigint operator&amp;=(bigint);
	bigint operator^=(bigint);
	bigint operator+=(bigint);
	bigint operator-=(bigint);
	bigint operator*=(bigint);
	bigint operator/=(bigint);
	bigint operator%=(bigint);
	bigint operator&lt;&lt;=(bigint);
	bigint operator&gt;&gt;=(bigint);

	bigint operator++();
	bigint operator++(int dummy);
	bigint operator--();
	bigint operator--(int dummy);

	friend std::ostream&amp; operator &lt;&lt;( std::ostream&amp; os, bigint&amp; b );
	friend std::istream&amp; operator &gt;&gt;( std::istream&amp; is, bigint&amp; b );
};

unsigned bigint::cona2u(char *src)
{
	unsigned ten, sum, eos=strlen(src)-1;

	for(sum=0, ten=1; (int)eos&gt;=0 &amp;&amp; ten&lt;=100000000; ten*=10, eos--)
	{
		sum+=ten*(src[eos]-'0');
		src[eos]=0;
	}
	return sum;
}

bigint::bigint()
{
	len=1;
	sign=0;
	dats=(unsigned*)calloc(1,sizeof(unsigned));
}

bigint::~bigint()
{
	free(dats);
}

bigint::bigint(const int src)
{
	len=1;
	sign=0;
	dats=(unsigned*)malloc(sizeof(unsigned)*len);
	dats[0]=src;
}

bigint::bigint(const char *src)
{
	char *str=(char*)malloc(sizeof(char)*(strlen(src)+1));

	sign=0;
	strcpy(str, src);
	if(src[0]=='-')
		strcpy(str,src+1), sign=1;
	if(src[0]=='+')
		strcpy(str,src+1);

	len=(strlen(src)-1)/9 + 1;
	dats=(unsigned*)malloc(sizeof(unsigned)*len);
	unsigned i;
	for(i=0; i&lt;len; i++)
	{
		dats[i]=cona2u(str);
	}
	free(str);
	shl(len*32);

	unsigned j, lmt=len/2;
	for(i=(len/2)*32; i; i--)
	{
		shr(1);
		for(j=len-1; j&gt;=lmt; j--)
		{
			if(dats[j]&gt;=2147483648)
				dats[j]-=1647483648;
		}
	}
}

bigint::bigint(const bigint &amp;src)
{
	len=src.len;
	sign=src.sign;
	dats=(unsigned*)malloc(sizeof(unsigned)*len);
	memcpy(dats, src.dats, sizeof(unsigned)*len);
}

unsigned bigint::resize(unsigned len_new)
{
	if(len==len_new)
		return len;
	unsigned *new_p=(unsigned*)malloc(sizeof(unsigned)*len_new);		//
	memcpy(new_p, dats, sizeof(unsigned)*((len&lt;len_new)?len:len_new));	//이부분에 realloc(dats, sizeof(unsigned)*len_new)쓰면 왜 값이 바뀌나요
	free(dats);															//
	dats=new_p;															//

	if(len &lt; len_new)
		memset(dats+len, 0, sizeof(unsigned)*(len_new-len));
	len=len_new;
	return len;
}

unsigned bigint::resize()
{
	unsigned i;
	for(i=len-1; dats[i]==0; i--);
	i++;
	if(i)
		resize(i);
	else
		resize(1);
	return len;
}

bigint bigint::abs()
{
	bigint toreturn(*this);
	toreturn.sign=0;
	return toreturn;
}

//1의 보수
bigint bigint::negative(unsigned len_new)
{
	bigint toreturn(*this);
	toreturn.resize(len_new);
	for(unsigned i=0; i&lt;len_new; i++)
		toreturn.dats[i]=~toreturn.dats[i];
	return toreturn;
}

int bigint::cmp(bigint &amp;b)
{
	if(len==1 &amp;&amp; b.len==1 &amp;&amp; dats[0]==0 &amp;&amp; b.dats[0]==0)
		return 0;
	if(sign==1 &amp;&amp; b.sign==0)
		return -1;
	if(sign==0 &amp;&amp; b.sign==1)
		return 1;

	int left=1, right=-1;	
	if(sign==1 &amp;&amp; b.sign==1)
		left=-1, right=1;

	if(len&gt;b.len)
		return left;
	if(len&lt;b.len)
		return right;

	for(int i=len-1; i&gt;=0; i--)
	{
		if(dats[i]&gt;b.dats[i])
			return left;
		if(dats[i]&lt;b.dats[i])
			return right;
	}
	return 0;
}

bigint bigint::_or(bigint &amp;b)
{
	if(len&lt;b.len)
		resize(b.len);
	unsigned i;
	for(i=0; i&lt;b.len; i++)
		dats[i]|=b.dats[i];
	return *this;
}

bigint bigint::_and(bigint &amp;b)
{
	if(len&lt;b.len)
		resize(b.len);
	unsigned i;
	for(i=0; i&lt;b.len; i++)
		dats[i]&amp;=b.dats[i];
	return *this;
}

bigint bigint::_xor(bigint &amp;b)
{
	if(len&lt;b.len)
		resize(b.len);
	unsigned i;
	for(i=0; i&lt;b.len; i++)
		dats[i]^=b.dats[i];
	return *this;
}

bigint bigint::shr(unsigned n)
{
	unsigned move=n&gt;&gt;5, cut=n&amp;31, i, j, tmp;
	dats[0]=dats[move]&gt;&gt;cut;
	for(i=1; i&lt;len-move; i++)
	{
		for(j=0, tmp=dats[i+move]; j&lt;32-cut; j++)	//dats[i+1]=dats[i+1]|(dats[i+move]&lt;&lt;(32-cut));
			tmp&lt;&lt;=1;								//
		dats[i-1]|=tmp;
		dats[i]=dats[i+move]&gt;&gt;cut;  
	}


	resize(len-move);//옮겨진 부분 삭제
	resize();
	return *this;
}

bigint bigint::shl(unsigned n)
{
	unsigned move=n&gt;&gt;5, cut=n&amp;31, i, j, tmp;

	resize(len+move+1);
	dats[len-1]=dats[len-move-1]&lt;&lt;cut;
	for(i=len-2; (int)i&gt;=(int)move; i--)
	{
		for(j=0, tmp=dats[i-move]; j&lt;32-cut; j++)	//dats[i+1]=dats[i+1]|(dats[i-move]&gt;&gt;(32-cut));
			tmp&gt;&gt;=1;								//
		dats[i+1]=dats[i+1]|tmp;					//
		dats[i]=dats[i-move]&lt;&lt;cut;
	}
	memset(dats, 0, sizeof(unsigned)*move);//뒤에 옮겨진 부분 0으로

	resize();
	return *this;
}

bigint bigint::add(bigint &amp;b)
{
	bigint toreturn=*this;
	long long carry=0;
	unsigned i;
	toreturn.resize( ((b.len&gt;toreturn.len)?b.len:toreturn.len) + 1 );

	for(i=0; i&lt;b.len; i++)
	{
		carry = (long long)toreturn.dats[i] + (long long)b.dats[i] + carry;
		toreturn.dats[i]=carry&amp;(((long long)1&lt;&lt;32)-1);
		carry&gt;&gt;=32;
	}

	for(; carry; i++)
	{
		carry=(long long)toreturn.dats[i] + carry;
		toreturn.dats[i]=carry&amp;(((long long)1&lt;&lt;32)-1);
		carry&gt;&gt;=32;
	}

	toreturn.resize();

	return toreturn;
}

//1의 보수 사용
bigint bigint::sub(bigint &amp;b)
{
	bigint toreturn(*this);
	bigint subtrahend(b);	//감수

	unsigned len_new=((toreturn.len&gt;b.len)?toreturn.len:b.len);
	subtrahend=subtrahend.negative(len_new);

	toreturn=toreturn.add(subtrahend);
	if(toreturn.len &gt; len_new)//자리올림수있으면
	{
		toreturn.resize(len_new);
		toreturn=toreturn.add((bigint)1);
	}
	else//자리올림수 없으면
	{
		toreturn=toreturn.negative(len_new);
		toreturn.sign=1;
	}
	return toreturn;
}

bigint bigint::mul(bigint &amp;b)
{
	bigint result, tmp;
	unsigned i, j;
	unsigned long long carry;
	for(i=0; i&lt;b.len; i++)
	{
		tmp.resize(len+1+i);
		for(carry=j=0; j&lt;len; j++)
		{
			carry=(long long)dats[j]*(long long)b.dats[i]+carry;
			tmp.dats[j+i]=(unsigned)carry&amp;(((long long)1&lt;&lt;32)-1);
			carry&gt;&gt;=32;
		}
		tmp.dats[j+i]=(unsigned)carry;
		result=result.add(tmp);
		memset(tmp.dats, 0, sizeof(unsigned)*tmp.len);
	}
	result.resize();
	return result;	
}

bigint bigint::div(bigint &amp;b, int ask_mod=0)
{
	bigint r=abs(), q=0, divisor=b.abs(), one=1;
	unsigned i;

	for(i=0;divisor.cmp(r)&lt;=0;divisor.shl(1),i++);
	i--;
	if((int)i&gt;0)
	{
		one.shl(i);
		divisor.shr(1);

		while(b.cmp(r)&lt;=0)//b&lt;=r
		{
			for(;divisor.cmp(r)&gt;0;divisor.shr(1),one.shr(1));
			q._or(one);
			r=r.sub(divisor);
		}
	}

	if(ask_mod)
		return r;
	return q;
}

std::string bigint::conbcd()
{
	unsigned *bcd, len_new, head, i, j;
	char  str_tmp[10];
	std::string result;

	len_new=10704*len/10000+1+len;

	bcd=(unsigned*)calloc(len_new, sizeof(unsigned));
	memcpy(bcd, dats, sizeof(unsigned)*len);

	for(head=len, i=0; i&lt;32*len; i++)
	{
		for(j=head; j&gt;=len; j--)
		{
			if(bcd[j]&gt;=500000000)
				bcd[j]+=1647483648;
		}
		if(bcd[head]&gt;&gt;31)
			head++;
		bcd[head]&lt;&lt;=1;
		for(j=head-1; (int)j&gt;=0; j--)
		{
			bcd[j+1]|=(bcd[j]&gt;&gt;31);
			bcd[j]&lt;&lt;=1;
		}		
	}

	for(i=len_new-1; bcd[i]==0; i--);

	sprintf(str_tmp, &quot;%u&quot;, bcd[i]);
	result.insert(result.size(), str_tmp);

	for(--i; i&gt;=len; i--)
	{
		sprintf(str_tmp, &quot;%09u&quot;, bcd[i]);
		result.insert(result.size(), str_tmp);
	}

	free(bcd);
	return result;
}

bigint bigint::operator=(const int src)
{
	resize(1);
	sign=0;	
	dats[0]=src;
	if(src&lt;0)
		sign=1, dats[0]*=-1;
	return *this;
}

bigint bigint::operator=(const bigint &amp;src)
{
	resize(src.len);
	sign=src.sign;
	memcpy(dats, src.dats, sizeof(unsigned)*len);
	return *this;
}

bigint bigint::operator=(const char *src)
{
	char *str=(char*)malloc(sizeof(char)*(strlen(src)+1));

	sign=0;
	strcpy(str, src);
	if(src[0]=='-')
		strcpy(str,src+1), sign=1;
	if(src[0]=='+')
		strcpy(str,src+1);

	resize((strlen(src)-1)/9 + 1);
	unsigned i;
	for(i=0; i&lt;len; i++)
	{
		dats[i]=cona2u(str);
	}
	free(str);
	shl(len*32);

	unsigned j, lmt=len/2;
	for(i=(len/2)*32; i; i--)
	{
		shr(1);
		for(j=len-1; j&gt;=lmt; j--)
		{
			if(dats[j]&gt;=2147483648)
				dats[j]-=1647483648;
		}
	}

	return *this;
}

bigint operator-(bigint a)
{
	a.sign^=1;
	return a;
}

bigint operator|(bigint a, bigint b)
{
	return a._or(b);
}

bigint operator&amp;(bigint a, bigint b)
{
	return a._and(b);
}

bigint operator^(bigint a, bigint b)
{
	return a._xor(b);
}

bigint operator+(bigint a, bigint b)
{
	if(a.sign==b.sign)
		return a.add(b);
	if(a.sign==0 &amp;&amp; b.sign==1)
		return a.sub(b);
	//a.sign==1 &amp;&amp; b.sign==0
	return b.sub(a);
}

bigint operator-(bigint a, bigint b)
{
	if(a.sign==1 &amp;&amp; b.sign==1)
	{
		b.sign=0;
		if((a.abs()).cmp(b.abs())==1)
			b.sign=1;
		b=b.sub(a);
		return b;
	}
	if(a.sign==0 &amp;&amp; b.sign==0)
		return a.sub(b);
	if(a.sign==0 &amp;&amp; b.sign==1)
		return a.add(b);
	//a.sign==1 &amp;&amp; b.sign==0
	a=a.add(b);
	a.sign=1;
	return a;
}

bigint operator*(bigint a, bigint b)
{
	bigint toreturn=a.mul(b);
	toreturn.sign=a.sign^b.sign;
	return toreturn;
}

bigint operator/(bigint a, bigint b)
{
	bigint toreturn=a.div(b);
	toreturn.sign=a.sign^b.sign;
	return toreturn;
}

bigint operator%(bigint a, bigint b)
{
	bigint toreturn=a.div(b,1);
	toreturn.sign=a.sign;
	return toreturn;
}

bigint operator&lt;&lt;(bigint a, bigint b)
{
	bigint tmp(2147483647);
	while(b.len&gt;1)
	{
		a.shl(2147483647);
		b=b.sub(tmp);
	}
	a.shl(b.dats[0]);
	return a;
}

bigint operator&gt;&gt;(bigint a, bigint b)
{
	bigint tmp(2147483647);
	while(b.len&gt;1)
	{
		a.shr(2147483647);
		b=b.sub(tmp);
	}
	a.shr(b.dats[0]);
	return a;
}

bool operator&lt;(bigint a, bigint b)
{
	if(a.cmp(b)&lt;0)
		return true;
	return false;
}

bool operator&lt;=(bigint a, bigint b)
{
	if(a.cmp(b)&lt;=0)
		return true;
	return false;
}

bool operator&gt;(bigint a, bigint b)
{
	if(a.cmp(b)&gt;0)
		return true;
	return false;
}

bool operator&gt;=(bigint a, bigint b)
{
	if(a.cmp(b)&gt;=0)
		return true;
	return false;
}

bool operator==(bigint a, bigint b)
{
	if(a.cmp(b)==0)
		return true;
	return false;
}

bool operator!=(bigint a, bigint b)
{
	if(a.cmp(b)==0)
		return false;
	return true;
}

bigint bigint::operator|=(bigint b)
{
	*this=*this|b;
	return *this;
}

bigint bigint::operator&amp;=(bigint b)
{
	*this=*this&amp;b;
	return *this;
}
bigint bigint::operator^=(bigint b)
{
	*this=*this^b;
	return *this;
}

bigint bigint::operator+=(bigint b)
{
	*this=*this+b;
	return *this;
}

bigint bigint::operator-=(bigint b)
{
	*this=*this-b;
	return *this;
}

bigint bigint::operator*=(bigint b)
{
	*this=*this*b;
	return *this;
}

bigint bigint::operator/=(bigint b)
{
	*this=*this/b;
	return *this;
}

bigint bigint::operator%=(bigint b)
{
	*this=*this%b;
	return *this;
}

bigint bigint::operator&lt;&lt;=(bigint b)
{
	*this=*this&lt;&lt;b;
	return *this;
}

bigint bigint::operator&gt;&gt;=(bigint b)
{
	*this=*this&gt;&gt;b;
	return *this;
}

bigint bigint::operator++()
{
	*this+=1;
	return *this;
}

bigint bigint::operator++(int dummy)
{
	bigint old(*this);
	*this+=1;
	return old;
}

bigint bigint::operator--()
{
	*this-=1;
	return *this;
}

bigint bigint::operator--(int dummy)
{
	bigint old(*this);
	*this-=1;
	return old;
}

std::ostream&amp; operator&lt;&lt;(std::ostream&amp; os, bigint&amp; b)
{
	os&lt;&lt;((b.sign)?&quot;-&quot;:&quot;&quot;)&lt;&lt;b.conbcd();

	return os;
}

std::istream&amp; operator&gt;&gt;(std::istream&amp; is, bigint&amp; b)
{
	std::string numstr;
	is&gt;&gt;numstr;
	b=numstr.c_str();

	return is;
}

bigint fac(bigint n)  
{  
	bigint result=1;
	for(; n&gt;0; n--)
		result*=n;
	return result;
}

int main()
{
	std::ofstream fout;
	fout.open(&quot;result.txt&quot;);

	bigint n=1;

	std::cin&gt;&gt;n;
	while(n&gt;0)
	{
		fout&lt;&lt;fac(n)&lt;&lt;'\n';
		std::cin&gt;&gt;n;
	}

	return 0;
}
&lt;/textarea&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;-webkit-monospace&quot; size=&quot;3&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;
&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;-webkit-monospace&quot; size=&quot;3&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: normal;&quot;&gt;앜ㅋㅋㅋ 더럽다.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;
&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;-webkit-monospace&quot; size=&quot;3&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: normal;&quot;&gt;10진수 출력 고쳤어&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;entry-ccl&quot; style=&quot;clear: both; text-align: right; margin-bottom: 10px&quot;&gt;
	&lt;img id=&quot;ccl-icon-459-0&quot; class=&quot;entry-ccl-by&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png&quot; alt=&quot;저작자 표시&quot;/&gt;
	&lt;img id=&quot;ccl-icon-459-1&quot; class=&quot;entry-ccl-nc&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png&quot; alt=&quot;비영리&quot;/&gt;
	&lt;img id=&quot;ccl-icon-459-2&quot; class=&quot;entry-ccl-nd&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black03.png&quot; alt=&quot;변경 금지&quot;/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
		&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-nd/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;
			&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-news-widget&quot; style=&quot;width: 100%; text-align: center&quot;&gt;
		  					&lt;embed src=&quot;http://api.v.daum.net/static/recombox1.swf&quot; quality=&quot;high&quot; flashvars=&quot;nid=4001059&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;false&quot; bgcolor=&quot;#ffffff&quot; width=&quot;400&quot; height=&quot;80&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot;&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/459&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>bigint</category>
			<category>bigint</category>
			<category>C++</category>
			<category>Class</category>
			<author>　환타</author>
			<guid>http://zfanta.com/459</guid>
			<comments>http://zfanta.com/entry/c-bigint-class%EC%99%84%EC%84%B1#entry459comment</comments>
			<pubDate>Sun, 20 Dec 2009 17:49:02 +0900</pubDate>
		</item>
		<item>
			<title>visual studio의 쉬프트연산 버그</title>
			<link>http://zfanta.com/entry/visual-studio%EC%9D%98-%EC%89%AC%ED%94%84%ED%8A%B8%EC%97%B0%EC%82%B0-%EB%B2%84%EA%B7%B8</link>
			<description>&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 504px; margin-top: 1px; margin-bottom: 1px; height: 236px; &quot;&gt;
int main()
{
	int i;
	
	i=0;
	i|=1&gt;&gt;(32-i);
	printf(&quot;%d\n&quot;,i);
	
	i=0;
	i|=1&gt;&gt;(32-0);
	printf(&quot;%d\n&quot;,i);

	return 0;
}
&lt;/textarea&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
vs에서 실행한 결과&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;imageblock&quot; style=&quot;display:inline;&quot;&gt;&lt;a href=&quot;http://cfile21.uf.tistory.com/original/2061550C4AA35E665ECDD8&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfile21.uf.tistory.com/image/2061550C4AA35E665ECDD8&quot; alt=&quot;&quot; filemime=&quot;image/jpeg&quot; filename=&quot;bug.jpg&quot; height=&quot;390&quot; width=&quot;414&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
codepad에서 실행한 결과(&lt;a href=&quot;http://codepad.org/7uYLNz6m&quot; target=&quot;_blank&quot; title=&quot;[http://codepad.org/7uYLNz6m]로 이동합니다.&quot;&gt;http://codepad.org/7uYLNz6m&lt;/a&gt;)&lt;/div&gt;
&lt;div&gt;&lt;div class=&quot;imageblock&quot; style=&quot;display:inline;&quot;&gt;&lt;a href=&quot;http://cfile4.uf.tistory.com/original/15693F0B4AA35EE659889C&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfile4.uf.tistory.com/image/15693F0B4AA35EE659889C&quot; alt=&quot;&quot; filemime=&quot;&quot; filename=&quot;codepad.jpg&quot; height=&quot;363&quot; width=&quot;319&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;
내가 이거때문에 bigint삽질을 얼마나 했는지&lt;/div&gt;
&lt;div&gt;&lt;div class=&quot;imageblock&quot; style=&quot;display:inline;&quot;&gt;&lt;a href=&quot;http://cfile22.uf.tistory.com/original/1218C3164AA363643F23DF&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfile22.uf.tistory.com/image/1218C3164AA363643F23DF&quot; alt=&quot;&quot; filemime=&quot;image/jpeg&quot; filename=&quot;디질래.jpg&quot; height=&quot;640&quot; width=&quot;480&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;
죽어&lt;/div&gt;&lt;div class=&quot;entry-ccl&quot; style=&quot;clear: both; text-align: right; margin-bottom: 10px&quot;&gt;
	&lt;img id=&quot;ccl-icon-460-0&quot; class=&quot;entry-ccl-by&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png&quot; alt=&quot;저작자 표시&quot;/&gt;
	&lt;img id=&quot;ccl-icon-460-1&quot; class=&quot;entry-ccl-nc&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png&quot; alt=&quot;비영리&quot;/&gt;
	&lt;img id=&quot;ccl-icon-460-2&quot; class=&quot;entry-ccl-nd&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black03.png&quot; alt=&quot;변경 금지&quot;/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
		&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-nd/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;
			&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-news-widget&quot; style=&quot;width: 100%; text-align: center&quot;&gt;
		  					&lt;embed src=&quot;http://api.v.daum.net/static/recombox1.swf&quot; quality=&quot;high&quot; flashvars=&quot;nid=4118112&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;false&quot; bgcolor=&quot;#ffffff&quot; width=&quot;400&quot; height=&quot;80&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot;&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/460&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>C/C++</category>
			<category>Visual Studio</category>
			<category>버그</category>
			<author>　환타</author>
			<guid>http://zfanta.com/460</guid>
			<comments>http://zfanta.com/entry/visual-studio%EC%9D%98-%EC%89%AC%ED%94%84%ED%8A%B8%EC%97%B0%EC%82%B0-%EB%B2%84%EA%B7%B8#entry460comment</comments>
			<pubDate>Sun, 06 Sep 2009 16:24:26 +0900</pubDate>
		</item>
		<item>
			<title>C언어로 오목게임만들기 개선</title>
			<link>http://zfanta.com/entry/C%EC%96%B8%EC%96%B4%EB%A1%9C-%EC%98%A4%EB%AA%A9%EA%B2%8C%EC%9E%84%EB%A7%8C%EB%93%A4%EA%B8%B0-%EA%B0%9C%EC%84%A0</link>
			<description>&lt;div&gt;
&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;-webkit-monospace&quot; size=&quot;3&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: normal;&quot;&gt;&lt;a href=&quot;http://zfanta.com/entry/C%EC%96%B8%EC%96%B4%EB%A1%9C-%EC%98%A4%EB%AA%A9%EB%A7%8C%EB%93%A4%EA%B8%B0-5-%EB%A7%88%EC%A7%80%EB%A7%89&quot;&gt;http://zfanta.com/entry/C언어로-오목만들기-5-마지막&lt;/a&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;
&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;-webkit-monospace&quot; size=&quot;3&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;
&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;-webkit-monospace&quot; size=&quot;3&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: normal;&quot;&gt;배운지 얼마 안돼서 만들었던 더러운 소스를 개선해봤습니다.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;
&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;-webkit-monospace&quot; size=&quot;3&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: normal; &quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-top: 1px; margin-bottom: 1px; height: 3617px; margin-left: 0px; margin-right: 0px; width: 100%; &quot;&gt;
#include &lt;stdio.h&gt;
#include &lt;string.h&gt;
#include &lt;conio.h&gt;
#include &lt;windows.h&gt;

#define UP 72  
#define DOWN 80  
#define LEFT 75  
#define RIGHT 77  
#define ENTER 13  

int board[19][19];
char display[19][19][3];

//커서 숨기기, 보이기(0, 1)
void CursorView(char show)
{
	HANDLE hConsole;
	CONSOLE_CURSOR_INFO ConsoleCursor;
	hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
	ConsoleCursor.bVisible = show;
	ConsoleCursor.dwSize = 1;
	SetConsoleCursorInfo(hConsole , &amp;ConsoleCursor);
}

//커서이동
void gotoxy(int x, int y)
{  
	COORD XY = {x, y};  
	SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), XY);  
}  

//승리메시지, 이어하기
int w_msg(int turn)
{
	char player[3][3]={&quot;&quot;, &quot;흑&quot;, &quot;백&quot;};
	char ans;

	gotoxy(0,20);
	printf(&quot;%s승리 계속할래? (y,n)&quot;, player[turn]);

	fflush(stdin);
	scanf(&quot;%c&quot;, &amp;ans);

	if(ans=='y')
		return 1;

	return 0;
}

//판깔기
void set()
{
	int y, x;

	memset(board, 0, sizeof(int)*19*19);

	strcpy(display[0][0], &quot;┌&quot;);strcpy(display[0][18] ,&quot;┐&quot;);
	strcpy(display[18][0],&quot;└&quot;);strcpy(display[18][18],&quot;┘&quot;);

	for(y=1; y&lt;18; y++)
	{
		strcpy(display[y][0], &quot;├&quot;);
		strcpy(display[y][18],&quot;┤&quot;);
	}
	for(x=1; x&lt;18; x++)
	{
		strcpy(display[0][x], &quot;┬&quot;);
		strcpy(display[18][x],&quot;┴&quot;);
	}
	for(y=1; y&lt;18; y++)	
		for(x=1; x&lt;18; x++)		
			strcpy(display[y][x],&quot;┼&quot;);

	system(&quot;CLS&quot;);
	for(y=0; y&lt;19; y++, puts(&quot;&quot;))
		for(x=0; x&lt;19; x++)
			printf(&quot;%s&quot;, display[y][x]);
}

//5개 확인
int win(int _y, int _x, int turn)
{
	int x,y;
	int count;
	//가로
	x=_x;
	count=0;
	while(x&gt;0 &amp;&amp; board[_y][x-1] == turn)x--;
	while(x&lt;=18 &amp;&amp; board[_y][x++] == turn)
		count++;

	if(count==5)
	{
		return 1;
	}

	//세로
	x=_x;
	y=_y;
	count=0;

	while(y&gt;0 &amp;&amp; board[y-1][_x] == turn)y--;
	while(y&lt;=18 &amp;&amp; board[y++][_x] == turn)
		count++;

	if(count==5)
	{
		return 1;
	}

	//대각선 ↘
	x=_x;
	y=_y;
	count=0;

	while(x &gt; 0 &amp;&amp; y &gt; 0 &amp;&amp; board[y-1][x-1]==turn)
	{
		x--;
		y--;
	}

	while(x&lt;=18 &amp;&amp; y&lt;=18 &amp;&amp; board[y++][x++] == turn)
		count++;

	if(count==5)
	{
		return 1;
	}

	//대각선 ↙
	x=_x;
	y=_y;
	count=0;

	while(x &lt; 18 &amp;&amp; y &gt; 0 &amp;&amp; board[y-1][x+1]==turn)
	{
		x++;
		y--;
	}

	while(x&gt;=0 &amp;&amp; y&lt;=18 &amp;&amp; board[y++][x--] == turn)
		count++;

	if(count==5)
	{
		return 1;
	}
	return 0;
}


void move(int *y, int *x)
{
	int old_y=*y, old_x=*x;
	char input;

	while((input=getch()) != ENTER)
	{
		if(input == UP)
		{
			old_x=*x;
			old_y=(*y)--;
		}
		else if(input == DOWN)
		{
			old_x=*x;
			old_y=(*y)++;
		}
		else if(input == LEFT)
		{
			old_x=(*x)--;
			old_y=*y;
		}
		else if(input == RIGHT)
		{
			old_x=(*x)++;
			old_y=*y;
		}

		//나머지 연산 엥꼬 방지를 위해 19를 더해줍니다.
		(*x)=((*x) + 19) % 19;
		(*y)=((*y) + 19) % 19;

		gotoxy(old_x*2, old_y);
		printf(&quot;%s&quot;, display[old_y][old_x]);

		gotoxy((*x)*2, *y);
		printf(&quot;⊙&quot;);
	}
}

int put_stone(int y, int x, int turn)
{
	char stone[3][3]={&quot;&quot;,&quot;○&quot;,&quot;●&quot;};
	if(board[y][x] == 0)
	{
		board[y][x]=turn;

		strcpy(display[y][x], stone[turn]);
		gotoxy(x*2, y);
		printf(&quot;%s&quot;, stone[turn]);
		return 1;
	}
	return 0;
}

int game()
{
	int y, x, turn;	//1:흑, 2:백
	char stone[3][3]={&quot;&quot;,&quot;○&quot;,&quot;●&quot;};

	set();	
	y=x=9;
	turn=2;

	gotoxy(x*2,y);
	printf(&quot;⊙&quot;);
	do
	{
		turn^=3;	//1은 2로, 2는 1로

		gotoxy(50, 10);
		printf(&quot;%s차례&quot;, stone[turn]);

		do
		{
			move(&amp;y, &amp;x);
		}while(!put_stone(y, x, turn));
	}while(!win(y, x, turn));

	return w_msg(turn);
}

int main()
{
	CursorView(0);
	while(game());
	return 0;
}
&lt;/textarea&gt;&lt;div&gt;
&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;-webkit-monospace&quot; size=&quot;3&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;
&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;-webkit-monospace&quot; size=&quot;3&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: normal;&quot;&gt;지금 다시 만들어도 더럽긴 하네요.......&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;
&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;-webkit-monospace&quot; size=&quot;3&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: normal;&quot;&gt;질문이나 버그는 리플로 많이 달아주세요.&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;
&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;-webkit-monospace&quot; size=&quot;3&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;
&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;-webkit-monospace&quot; size=&quot;3&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: normal;&quot;&gt;&lt;p id=&quot;more456_0&quot; class=&quot;moreless_fold&quot;&gt;&lt;span style=&quot;cursor: pointer;&quot; onclick=&quot;toggleMoreLess(this, '456_0','영양가 없는 글에는 짤방','접기'); return false;&quot;&gt;영양가 없는 글에는 짤방&lt;/span&gt;&lt;/p&gt;&lt;div id=&quot;content456_0&quot; class=&quot;moreless_content&quot; style=&quot;display: none;&quot;&gt;&lt;div class=&quot;imageblock&quot; style=&quot;display:inline;&quot;&gt;&lt;a href=&quot;http://cfile2.uf.tistory.com/original/113C9F204A6AE993016BED&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfile2.uf.tistory.com/image/113C9F204A6AE993016BED&quot; alt=&quot;&quot; filemime=&quot;image/jpeg&quot; filename=&quot;초딩.jpg&quot; height=&quot;2700&quot; width=&quot;400&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class=&quot;entry-ccl&quot; style=&quot;clear: both; text-align: right; margin-bottom: 10px&quot;&gt;
	&lt;img id=&quot;ccl-icon-456-0&quot; class=&quot;entry-ccl-by&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png&quot; alt=&quot;저작자 표시&quot;/&gt;
	&lt;img id=&quot;ccl-icon-456-1&quot; class=&quot;entry-ccl-nc&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png&quot; alt=&quot;비영리&quot;/&gt;
	&lt;img id=&quot;ccl-icon-456-2&quot; class=&quot;entry-ccl-nd&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black03.png&quot; alt=&quot;변경 금지&quot;/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
		&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-nd/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;
			&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-news-widget&quot; style=&quot;width: 100%; text-align: center&quot;&gt;
		  					&lt;embed src=&quot;http://api.v.daum.net/static/recombox1.swf&quot; quality=&quot;high&quot; flashvars=&quot;nid=3758571&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;false&quot; bgcolor=&quot;#ffffff&quot; width=&quot;400&quot; height=&quot;80&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot;&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/456&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>C/C++</category>
			<category>c</category>
			<category>게임</category>
			<category>오목</category>
			<author>　환타</author>
			<guid>http://zfanta.com/456</guid>
			<comments>http://zfanta.com/entry/C%EC%96%B8%EC%96%B4%EB%A1%9C-%EC%98%A4%EB%AA%A9%EA%B2%8C%EC%9E%84%EB%A7%8C%EB%93%A4%EA%B8%B0-%EA%B0%9C%EC%84%A0#entry456comment</comments>
			<pubDate>Sat, 25 Jul 2009 20:17:42 +0900</pubDate>
		</item>
		<item>
			<title>프로그래밍 카테고리의 새글은 Studying the Logical World에 쓰여집니다.</title>
			<link>http://zfanta.com/entry/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D-%EC%B9%B4%ED%85%8C%EA%B3%A0%EB%A6%AC%EC%9D%98-%EC%83%88%EA%B8%80%EC%9D%80-Studying-the-Logical-World%EC%97%90-%EC%93%B0%EC%97%AC%EC%A7%91%EB%8B%88%EB%8B%A4-1</link>
			<description>&lt;font class=&quot;Apple-style-span&quot; color=&quot;#000000&quot; face=&quot;Verdana&quot;&gt;&lt;div&gt;
오래 전부터 &lt;a href=&quot;http://studyinglw.tistory.com&quot; target=&quot;_blank&quot; title=&quot;[http://studyinglw.tistory.com]로 이동합니다.&quot;&gt;Studying the Logical World.&lt;/a&gt;의 &lt;a href=&quot;http://studyinglw.tistory.com&quot; target=&quot;_blank&quot; title=&quot;[http://studyinglw.tistory.com]로 이동합니다.&quot;&gt;fanta's&lt;/a&gt;카테고리에 글 쓰고 있었습니다.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
새 글은 &lt;a href=&quot;http://studyinglw.tistory.com&quot; target=&quot;_blank&quot; title=&quot;[http://studyinglw.tistory.com]로 이동합니다.&quot;&gt;http://studyinglw.tistory.com&lt;/a&gt;에서 확인해주세요.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;imageblock&quot; style=&quot;display:inline;&quot;&gt;&lt;a href=&quot;http://cfile5.uf.tistory.com/original/1822DC164A2BCBB1E16A3E&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfile5.uf.tistory.com/image/1822DC164A2BCBB1E16A3E&quot; alt=&quot;&quot; filemime=&quot;image/jpeg&quot; filename=&quot;개밥 털이.jpg&quot; height=&quot;375&quot; width=&quot;400&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
많이 들러주세요.&lt;/div&gt;
&lt;/font&gt;&lt;div class=&quot;entry-ccl&quot; style=&quot;clear: both; text-align: right; margin-bottom: 10px&quot;&gt;
	&lt;img id=&quot;ccl-icon-452-0&quot; class=&quot;entry-ccl-by&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png&quot; alt=&quot;저작자 표시&quot;/&gt;
	&lt;img id=&quot;ccl-icon-452-1&quot; class=&quot;entry-ccl-nc&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png&quot; alt=&quot;비영리&quot;/&gt;
	&lt;img id=&quot;ccl-icon-452-2&quot; class=&quot;entry-ccl-nd&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black03.png&quot; alt=&quot;변경 금지&quot;/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
		&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-nd/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;
			&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/452&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>Programming</category>
			<author>　환타</author>
			<guid>http://zfanta.com/452</guid>
			<comments>http://zfanta.com/entry/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D-%EC%B9%B4%ED%85%8C%EA%B3%A0%EB%A6%AC%EC%9D%98-%EC%83%88%EA%B8%80%EC%9D%80-Studying-the-Logical-World%EC%97%90-%EC%93%B0%EC%97%AC%EC%A7%91%EB%8B%88%EB%8B%A4-1#entry452comment</comments>
			<pubDate>Sun, 07 Jun 2009 23:17:24 +0900</pubDate>
		</item>
		<item>
			<title>C 연산자 우선순위</title>
			<link>http://zfanta.com/entry/%E3%85%81</link>
			<description>&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; color: rgb(68, 68, 68); font-size: 13px; line-height: 22px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px;&quot;&gt;&lt;table border=&quot;1&quot; cellspacing=&quot;0&quot; bordercolordark=&quot;white&quot; bordercolorlight=&quot;black&quot; width=&quot;100%&quot;&gt;
    &lt;tbody&gt;&lt;tr&gt;
        &lt;td width=&quot;30%&quot; height=&quot;21&quot;&gt;1(우선순위, 낮을수록 먼저 수행)&lt;/td&gt;
        &lt;td width=&quot;35%&quot; height=&quot;21&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;( ) [ ] -&gt; .&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width=&quot;35%&quot; height=&quot;21&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&lt;span style=&quot;font-family: 굴림; &quot;&gt;왼쪽&lt;/span&gt; &lt;span style=&quot;font-family: 굴림; &quot;&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width=&quot;30%&quot;&gt;2&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;! ~ ++ -- + -(&lt;/span&gt;&lt;span style=&quot;font-family: 굴림; &quot;&gt;부호&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;) *(&lt;/span&gt;&lt;span style=&quot;font-family: 굴림; &quot;&gt;포인터&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;) &amp;amp; sizeof&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&lt;span style=&quot;font-family: 굴림; &quot;&gt;오른쪽&lt;/span&gt; &lt;span style=&quot;font-family: 굴림; &quot;&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width=&quot;30%&quot;&gt;3&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;*(&lt;/span&gt;&lt;span style=&quot;font-family: 굴림; &quot;&gt;곱셈&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;) / %&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&lt;span style=&quot;font-family: 굴림; &quot;&gt;왼쪽&lt;/span&gt; &lt;span style=&quot;font-family: 굴림; &quot;&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width=&quot;30%&quot;&gt;4&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;+ -(&lt;/span&gt;&lt;span style=&quot;font-family: 굴림; &quot;&gt;덧셈&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;font-family: 굴림; &quot;&gt;뺄셈&lt;/span&gt;&lt;span lang=&quot;EN-US&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&lt;span style=&quot;font-family: 굴림; &quot;&gt;왼쪽&lt;/span&gt; &lt;span style=&quot;font-family: 굴림; &quot;&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width=&quot;30%&quot;&gt;5&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&amp;lt;&amp;lt; &gt;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&lt;span style=&quot;font-family: 굴림; &quot;&gt;왼쪽&lt;/span&gt; &lt;span style=&quot;font-family: 굴림; &quot;&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width=&quot;30%&quot;&gt;6&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&amp;lt; &amp;lt;= &gt; &gt;=&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&lt;span style=&quot;font-family: 굴림; &quot;&gt;왼쪽&lt;/span&gt; &lt;span style=&quot;font-family: 굴림; &quot;&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width=&quot;30%&quot;&gt;7&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;== !=&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&lt;span style=&quot;font-family: 굴림; &quot;&gt;왼쪽&lt;/span&gt; &lt;span style=&quot;font-family: 굴림; &quot;&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width=&quot;30%&quot;&gt;8&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&amp;amp;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&lt;span style=&quot;font-family: 굴림; &quot;&gt;왼쪽&lt;/span&gt; &lt;span style=&quot;font-family: 굴림; &quot;&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width=&quot;30%&quot;&gt;9&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;^&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&lt;span style=&quot;font-family: 굴림; &quot;&gt;왼쪽&lt;/span&gt; &lt;span style=&quot;font-family: 굴림; &quot;&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width=&quot;30%&quot;&gt;10&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;|&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&lt;span style=&quot;font-family: 굴림; &quot;&gt;왼쪽&lt;/span&gt; &lt;span style=&quot;font-family: 굴림; &quot;&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width=&quot;30%&quot;&gt;11&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&lt;span style=&quot;font-family: 굴림; &quot;&gt;왼쪽&lt;/span&gt; &lt;span style=&quot;font-family: 굴림; &quot;&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width=&quot;30%&quot;&gt;12&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;||&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&lt;span style=&quot;font-family: 굴림; &quot;&gt;왼쪽&lt;/span&gt; &lt;span style=&quot;font-family: 굴림; &quot;&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width=&quot;30%&quot;&gt;13&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;? :&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&lt;span style=&quot;font-family: 굴림; &quot;&gt;오른쪽&lt;/span&gt; &lt;span style=&quot;font-family: 굴림; &quot;&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width=&quot;30%&quot;&gt;14&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;font-family: 굴림; &quot;&gt;복합대입&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&lt;span style=&quot;font-family: 굴림; &quot;&gt;오른쪽&lt;/span&gt; &lt;span style=&quot;font-family: 굴림; &quot;&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width=&quot;30%&quot;&gt;15&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;,&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
        &lt;td width=&quot;35%&quot;&gt;            &lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: 돋움; line-height: 19px; &quot;&gt;&lt;span style=&quot;font-family: 굴림; &quot;&gt;왼쪽&lt;/span&gt; &lt;span style=&quot;font-family: 굴림; &quot;&gt;우선&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/span&gt;&lt;/span&gt;&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; color: rgb(68, 68, 68); font-size: 13px; line-height: 22px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; color: rgb(68, 68, 68); font-size: 13px; line-height: 22px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; color: rgb(68, 68, 68); font-size: 13px; line-height: 22px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;&quot;&gt;외울 필요없이 그냥 헷갈리면 괄호로 감싸주세요.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;entry-ccl&quot; style=&quot;clear: both; text-align: right; margin-bottom: 10px&quot;&gt;
	&lt;img id=&quot;ccl-icon-444-0&quot; class=&quot;entry-ccl-by&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png&quot; alt=&quot;저작자 표시&quot;/&gt;
	&lt;img id=&quot;ccl-icon-444-1&quot; class=&quot;entry-ccl-nc&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png&quot; alt=&quot;비영리&quot;/&gt;
	&lt;img id=&quot;ccl-icon-444-2&quot; class=&quot;entry-ccl-nd&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black03.png&quot; alt=&quot;변경 금지&quot;/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
		&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-nd/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;
			&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/444&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>C/C++</category>
			<category>C언어</category>
			<author>　환타</author>
			<guid>http://zfanta.com/444</guid>
			<comments>http://zfanta.com/entry/%E3%85%81#entry444comment</comments>
			<pubDate>Sat, 07 Mar 2009 21:05:56 +0900</pubDate>
		</item>
		<item>
			<title>UVa. 101 - The Blocks Problem 번역</title>
			<link>http://zfanta.com/entry/UVa-101-The-Blocks-Problem-%EB%B2%88%EC%97%AD</link>
			<description>&lt;a href=&quot;http://원문링크&quot; target=&quot;_blank&quot; title=&quot;[http://원문링크]로 이동합니다.&quot;&gt;원문링크&lt;/a&gt;&lt;div&gt;
&lt;div class=&quot;imageblock&quot; style=&quot;display:inline;&quot;&gt;&lt;a href=&quot;http://zfanta.tistory.com/attachment/49a6708140732EY.pdf&quot;&gt;&lt;img src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/blog/image/extension/pdf.gif&quot; alt=&quot;&quot; style=&quot;vertical-align: middle;&quot; /&gt; 101.pdf&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: 'times new roman'; font-size: 16px; line-height: normal; &quot;&gt;&lt;h1&gt;&lt;center&gt;&lt;table bgcolor=&quot;#0060F0&quot;&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;b&gt;&lt;font size=&quot;5&quot; color=&quot;#C0FFFF&quot;&gt;&lt;a name=&quot;SECTION0001000000000000000000&quot;&gt;블록 문제&lt;/a&gt; &lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;&lt;/h1&gt;&lt;p&gt;&lt;/p&gt;
&lt;h2&gt;&lt;font color=&quot;#0070E8&quot;&gt;&lt;a name=&quot;SECTION0001001000000000000000&quot;&gt;배경&lt;/a&gt; &lt;/font&gt;&lt;/h2&gt;&lt;p&gt;과감히 생략.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2&gt;&lt;font color=&quot;#0070E8&quot;&gt;&lt;a name=&quot;SECTION0001002000000000000000&quot;&gt;문제&lt;/a&gt; &lt;/font&gt;&lt;/h2&gt;로봇의 팔이 평평한 테이블에 있는 블럭을 명령어대로 움직이게 하는 문제.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: 'times new roman'; font-size: 16px; line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: 'times new roman'; font-size: 16px; line-height: normal; &quot;&gt;처음엔 아래처럼 n개의 블록(0부터 n-1까지)들이 있고 &lt;img width=&quot;106&quot; height=&quot;31&quot; align=&quot;MIDDLE&quot; border=&quot;0&quot; src=&quot;http://icpcres.ecs.baylor.edu/onlinejudge/external/1/101img1.gif&quot; alt=&quot;$0 \leq i &amp;lt; n-1$&quot;&gt;의 범위 내에 모든 &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: italic; &quot;&gt;i&lt;/span&gt;에 대해 &lt;i&gt;b&lt;/i&gt;&lt;sub&gt;&lt;i&gt;i&lt;/i&gt;&lt;/sub&gt; 와  &lt;i&gt;b&lt;/i&gt;&lt;sub&gt;&lt;i&gt;i&lt;/i&gt;+1&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 16px; &quot;&gt;은 인접해있다.&lt;div class=&quot;imageblock center&quot; style=&quot;text-align: center; clear: both;&quot;&gt;&lt;a href=&quot;http://cfs13.tistory.com/original/26/tistory/2009/02/26/20/32/49a67de66d5e5&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfs13.tistory.com/image/26/tistory/2009/02/26/20/32/49a67de66d5e5&quot; alt=&quot;&quot; filemime=&quot;&quot; filename=&quot;101img2.gif&quot; height=&quot;52&quot; width=&quot;433&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;/span&gt;&lt;/sub&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: 'times new roman'; font-size: 16px; line-height: normal; &quot;&gt;&lt;div align=&quot;CENTER&quot;&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(51, 51, 51); font-weight: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;그림 :&lt;/strong&gt; 아름다운 초기의 블럭나라&lt;/div&gt;
&lt;br /&gt;
&lt;p&gt;로봇의 팔에 하사하는 명령어 :&lt;/p&gt;
&lt;p&gt;*a와 b는 블럭번호.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;move &lt;i&gt;a&lt;/i&gt; onto &lt;i&gt;b&lt;/i&gt;&lt;p&gt;a와 b에 있는 블록들을 제자리에 돌려놓고 a블럭을 b블럭 위로 옮긴다.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;move &lt;i&gt;a&lt;/i&gt; over &lt;i&gt;b&lt;/i&gt;&lt;p&gt;a위에 있는 블록들을 제자리에 돌려놓고 b블럭이 있는 블럭 기둥의 꼭대기로 a를 옮긴다.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;pile &lt;i&gt;a&lt;/i&gt; onto &lt;i&gt;b&lt;/i&gt;&lt;p&gt;b위에 있는 블록들을 제자리에 돌려놓고 a블록 위에 있는 블록기둥( a를 포함하여)을 b위로 옮긴다. 옮길 때 블록의 순서는 유지한다.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;pile &lt;i&gt;a&lt;/i&gt; over &lt;i&gt;b&lt;br /&gt;
&lt;/i&gt;&lt;p&gt;a블록 위에 있는 블록기둥( a를 포함하여)을 b가 있는 블록기둥위로 옮긴다. 옮길 때 블록의 순서는 유지한다.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;quit&lt;p&gt;종료.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;a = b일 때나 a와 b가 같은 블록기둥에 있을 때는 잘못된 명령이므로 무시한다.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2&gt;&lt;font color=&quot;#0070E8&quot;&gt;&lt;a name=&quot;SECTION0001003000000000000000&quot;&gt;입력&lt;/a&gt; &lt;/font&gt;&lt;/h2&gt;첫 줄은 블록나라의 블록 개수를 나타내는 n(0 &amp;lt; &lt;i&gt;n&lt;/i&gt; &amp;lt; 25)이 입력된다.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: 'times new roman'; font-size: 16px; line-height: normal;&quot;&gt;두 번째 줄부터 한 줄에 하나의 명령어가 입력되며 quit명령어가 입력될 때 까지 실행한다.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: 'times new roman'; font-size: 16px; line-height: normal; &quot;&gt;
&lt;p&gt;잘못된 문법의 명령어는 없다.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2&gt;&lt;font color=&quot;#0070E8&quot;&gt;&lt;a name=&quot;SECTION0001004000000000000000&quot;&gt;출력&lt;/a&gt; &lt;/font&gt;&lt;/h2&gt;&lt;p&gt;블록나라의 최종모습을 출력한다. &lt;/p&gt;
&lt;p&gt;각 줄의 처음에는 블록기둥 위치의 번호 &lt;i&gt;i&lt;/i&gt; ( &lt;img width=&quot;76&quot; height=&quot;31&quot; align=&quot;MIDDLE&quot; border=&quot;0&quot; src=&quot;/attachment/49a67e3fcc730BY.gif&quot; alt=&quot;$0 \leq i &amp;lt; n$&quot;&gt;, n은 블록의 개수)를 출력하고 바로 다음에 콜론(:)을 출력한다 . &lt;/p&gt;
&lt;p&gt;공백문자 하나를 출력한다.&lt;/p&gt;
&lt;p&gt;블록이 있다면 공백문자로 구분하여 출력하고 없다면 출력하지 않는다.&lt;/p&gt;
&lt;p&gt;줄 끝에는 공백이 있으면 안된다.&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 112, 232); font-size: 24px; font-weight: bold; &quot;&gt;&lt;a name=&quot;SECTION0001005000000000000000&quot;&gt;입력 예시&lt;/a&gt; &lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;10
move 9 onto 1
move 8 over 1
move 7 over 1
move 6 over 1
pile 8 over 6
pile 8 over 5
move 2 over 1
move 4 over 9
quit
&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;h2&gt;&lt;font color=&quot;#0070E8&quot;&gt;&lt;a name=&quot;SECTION0001006000000000000000&quot;&gt;출력 예시&lt;/a&gt; &lt;/font&gt;&lt;/h2&gt;&lt;pre&gt; 0: 0
 1: 1 9 2 4
 2:
 3: 3
 4:
 5: 5 8 7 6
 6:
 7:
 8:
 9:&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;
&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;
&lt;/pre&gt;&lt;pre&gt;AC&lt;/pre&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-top: 1px; margin-bottom: 1px; height: 2015px; margin-left: 0px; margin-right: 0px; width: 705px; &quot;&gt;
#include &lt;iostream&gt;
#include &lt;vector&gt;

using namespace std;
int n;
vector&lt; int &gt; blocks[25];

void init()
{
	int i;
	for(i=0; i&lt;n; i++)
		blocks[i].push_back(i);
}

int find_block(int block)
{
	int i,j;
	
	for(i=0; i&lt;n; i++)
		for(j=0; j&lt;blocks[i].size(); j++)
			if(block==blocks[i][j])
				return i;
}

void returning(int a)
{
	int i, index;
	
	index=find_block(a);
	for(i=blocks[index].size()-1; blocks[index][i]!=a; i--)
	{
		blocks[blocks[index][i]].push_back(blocks[index][i]);
		blocks[index].pop_back();
	}
}

void move()
{
	int a, b;
	int index_a, index_b;
	char option[5];
	
	scanf(&quot; %d %s %d&quot;, &amp;a, option, &amp;b);

	index_a=find_block(a);
	index_b=find_block(b);

	if(index_a == index_b)
		return;

	if(a==b)
		return;
	if( strcmp(option, &quot;onto&quot;)==0 )
	{
		returning(b);
	}	
	returning(a);
	
	blocks[index_b].push_back(blocks[index_a][blocks[index_a].size()-1]);
	blocks[index_a].pop_back();
}

void pile()
{
	int a, b;
	int index_a, index_b, i;
	char option[5];
	vector&lt;int&gt; tmp;
	
	scanf(&quot; %d %s %d&quot;, &amp;a, option, &amp;b);

	index_a=find_block(a);
	index_b=find_block(b);

	if(index_a == index_b)
		return;

	if( strcmp(option, &quot;onto&quot;)==0 )
	{
		returning(b);
	}
	
	for(i=blocks[index_a].size()-1; ; i--)//
	{
		tmp.push_back(blocks[index_a][i]);
		blocks[index_a].pop_back();
		if(tmp[tmp.size()-1]==a)
			break;
	}
	for(i=tmp.size()-1; tmp.empty()==0; i--)//
	{
		blocks[index_b].push_back(tmp[i]);
		tmp.pop_back();
	}
}

int get_com()
{
	char com[5];
	
	scanf(&quot;%s&quot;, com);
	if( strcmp(com, &quot;quit&quot;)==0 )
		return 0;
	
	else if( strcmp(com, &quot;move&quot;)==0 )
		move();
	else
		pile();
	return 1;
}

void print()
{
	int i,j;
	for(i=0; i&lt;n; i++)
	{
		printf(&quot;%d:&quot;,i);
		for(j=0; j&lt;blocks[i].size(); j++)
		{
			printf(&quot; %d&quot;,blocks[i][j]);
		}
		printf(&quot;\n&quot;);
	}
}

int main()
{
	scanf(&quot;%d&quot;,&amp;n);

	init();	
	while( get_com() );
	print();
}
&lt;/textarea&gt;&lt;div class=&quot;entry-ccl&quot; style=&quot;clear: both; text-align: right; margin-bottom: 10px&quot;&gt;
	&lt;img id=&quot;ccl-icon-442-0&quot; class=&quot;entry-ccl-by&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png&quot; alt=&quot;저작자 표시&quot;/&gt;
	&lt;img id=&quot;ccl-icon-442-1&quot; class=&quot;entry-ccl-nc&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png&quot; alt=&quot;비영리&quot;/&gt;
	&lt;img id=&quot;ccl-icon-442-2&quot; class=&quot;entry-ccl-nd&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black03.png&quot; alt=&quot;변경 금지&quot;/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
		&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-nd/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;
			&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/442&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>algorithm</category>
			<category>UVA</category>
			<category>프로그래밍</category>
			<author>　환타</author>
			<guid>http://zfanta.com/442</guid>
			<comments>http://zfanta.com/entry/UVa-101-The-Blocks-Problem-%EB%B2%88%EC%97%AD#entry442comment</comments>
			<pubDate>Thu, 26 Feb 2009 19:48:54 +0900</pubDate>
		</item>
		<item>
			<title>아... 소멸자가 사람 잡아요.</title>
			<link>http://zfanta.com/entry/%EC%95%84-%EC%86%8C%EB%A9%B8%EC%9E%90%EA%B0%80-%EC%82%AC%EB%9E%8C-%EC%9E%A1%EC%95%84%EC%9A%94</link>
			<description>&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 100%; margin-top: 1px; margin-bottom: 1px; height: 3060px; &quot;&gt;
#include &lt;iostream&gt;

class bigfloat
{
private:
	char *arr;
	char sign;
	int leninte, lendeci, lenwh;

public:
	bigfloat();
	~bigfloat();
	void operator = (char *);
	void operator = (double);
	void operator = (bigfloat &amp;);
	void print();

	friend bigfloat operator + (bigfloat &amp;, bigfloat &amp;);
};

bigfloat::bigfloat()
{
	arr=new char[1];
	arr[0]=0;
	sign='+';
	lenwh=leninte=1;
	lendeci=0;
}

bigfloat::~bigfloat()
{
	delete []arr;
	std::cout&lt;&lt;&quot;소멸자&quot;&lt;&lt;std::endl;
}

void bigfloat::operator = (char *tmp)
{
	int i, last, flagdeci=0, ind_arr;
	char *string;

	last=strlen(tmp);

	string=new char[last+1];
	memcpy(string,tmp,sizeof(char)*last+1);


	if(string[0] == '+' || string[0] == '-')	//부호제거
	{
		sign=string[0];
		for(i=0; i&lt;last; i++)
			string[i]=string[i+1];
		last--;
	}

	for(i=0; i&lt;last; i++)
	{
		if(string[i]=='.')						//.있으면
		{
			flagdeci=1;
			break;
		}
	}

	if(flagdeci)
	{
		for(i=last-1; string[i]=='0'; i--)		//0제거
		{
			string[i]='\0';
		}
		if(string[i]=='.')
			string[i]='\0';
	}

	for(i=0; string[i]!='.' &amp;&amp; string[i]!='\0'; i++);
	leninte=i;

	if(flagdeci)
		i++;

	for(; string[i]!='\0'; i++);
	lendeci = i - (leninte+flagdeci);
	lenwh = leninte + lendeci;

	delete []arr;
	arr=new char[lenwh];

	ind_arr=i=0;
	while(string[i]!='\0')
	{
		arr[ind_arr++]=string[i++]-'0';
		if(string[i]=='.')
			i++;
	}
}

void bigfloat::operator = (double a)
{
	char string[512];
	sprintf(string,&quot;%lf&quot;,a);
	*this=string;
}



void bigfloat::operator = (bigfloat &amp;src)
{
	this-&gt;lendeci = src.lendeci;
	this-&gt;leninte = src.leninte;
	this-&gt;lenwh   = src.lenwh;
	if(arr)
	delete []this-&gt;arr;
	this-&gt;arr = new char[this-&gt;lenwh];
	memcpy(this-&gt;arr, src.arr, sizeof(char) * this-&gt;lenwh);
}
void bigfloat::print()
{
	int i;
	for(i=0; i&lt;lenwh; i++)
	{
		if(i==leninte)
			printf(&quot;.&quot;);
		printf(&quot;%d&quot;,arr[i]);
	}
	printf(&quot;\nsign:%c\nlenwh:%d\nleninte:%d\nlendeci:%d&quot;,sign,lenwh,leninte,lendeci);
	printf(&quot;\n\n&quot;);

}
bigfloat operator + (bigfloat &amp;first, bigfloat &amp;second)
{
	int lennew, point, ind_result, ind_shorter, i, j, hi, flag;
	char *result, *string;
	bigfloat toreturn;

	bigfloat &amp;longer=(first.leninte &gt; second.leninte)?first:second;
	bigfloat &amp;shorter=(first.leninte &lt;= second.leninte)?first:second;

	lennew = point = (first.leninte &gt; second.leninte)?first.leninte:second.leninte;
	lennew += (first.lendeci &gt; second.lendeci)?first.lendeci:second.lendeci;

	result = new char[lennew+1];
	memset(result, 0, sizeof(char) * (lennew + 1));
	memcpy(result+1, longer.arr, sizeof(char) * longer.lenwh);
	
	if(shorter.lendeci &gt; longer.lendeci)
		ind_result=lennew;
	else
		ind_result=lennew - (longer.lendeci - shorter.lendeci);
	ind_shorter=shorter.lenwh-1;

	while(ind_shorter &gt;= 0)
	{
		result[ind_result] += shorter.arr[ind_shorter];

		for(i = ind_result; result[i]&gt;=10; i--)
		{
			hi = result[i] / 10;
			result[i] %= 10;
			result[i-1] += hi;
		}
		ind_result--;
		ind_shorter--;
	}

	flag=0;

	if(result[0] != 0)
		flag=1;

	string = new char[lennew + 1 + flag + 1];
	string[point + flag] = '.';
	i = 1 - flag;
	j=0;

	while(j &lt; lennew + flag +1)
	{
		string[j++] = result[i++] + '0';
		if(string[j]=='.')
			j++;
	}
	string[j]='\0';

	toreturn=string;
	delete []result;
	delete []string;

	return toreturn;
}

int main()
{
	bigfloat a, b, c;
 	char aa[100], bb[100];

	scanf(&quot;%s %s&quot;,aa,bb);

	a=aa;
	b=bb;

	(a+b).print();
	
	return 0;
}

&lt;/textarea&gt;&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;&quot;&gt;(a+b)에 리턴한 거 대입하기 전에 소멸자가 호출되잖아 흐흔으ㅡㅏㄴ머흠녘ㅁ&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;imageblock&quot; style=&quot;display:inline;&quot;&gt;&lt;a href=&quot;http://cfs11.tistory.com/original/33/tistory/2009/02/15/21/39/49980ce6732c8&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfs11.tistory.com/image/33/tistory/2009/02/15/21/39/49980ce6732c8&quot; alt=&quot;&quot; filemime=&quot;&quot; filename=&quot;개밥털이.jpg&quot; height=&quot;375&quot; width=&quot;400&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
지금 기분.jpg&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;&quot;&gt;20분만에 추가한 해결책&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;&quot;&gt;깊은 복사생성자만 만들어주면 됩니다.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;&quot;&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-top: 1px; margin-bottom: 1px; height: 148px; margin-left: 0px; margin-right: 0px; width: 473px; &quot;&gt;
bigfloat::bigfloat(bigfloat &amp;src)
{
	this-&gt;sign    = src.sign;
	this-&gt;lendeci = src.lendeci;
	this-&gt;leninte = src.leninte;
	this-&gt;lenwh   = src.lenwh;
	this-&gt;arr     = new char[this-&gt;lenwh];
	memcpy(this-&gt;arr, src.arr, sizeof(char) * this-&gt;lenwh);
}
&lt;/textarea&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;&quot;&gt;아 왜, 깊은 복사생성자를 만든다는 게 깊은 대입연산자만 만들었을까.....&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-size: 13px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: 굴림; line-height: 20px; &quot;&gt;클래스변수를 리턴하는 함수는 리턴을 위한 클래스를 따로 만든다는 사실 하나 배웠네요.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-size: 13px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;imageblock&quot; style=&quot;display:inline;&quot;&gt;&lt;a href=&quot;http://cfs13.tistory.com/original/32/tistory/2009/02/15/22/32/4998198a69492&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfs13.tistory.com/image/32/tistory/2009/02/15/22/32/4998198a69492&quot; alt=&quot;&quot; filemime=&quot;&quot; filename=&quot;삽질.jpg&quot; height=&quot;540&quot; width=&quot;720&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-size: 13px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
오랜만에 유용했던 삽질.jpg&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
ps. 고마워요 &lt;a href=&quot;http://bab2min.tistory.com/&quot; target=&quot;_blank&quot; title=&quot;[http://bab2min.tistory.com/]로 이동합니다.&quot;&gt;적분형님&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
      PG어 경배합니다.&lt;/div&gt;&lt;div class=&quot;entry-ccl&quot; style=&quot;clear: both; text-align: right; margin-bottom: 10px&quot;&gt;
	&lt;img id=&quot;ccl-icon-440-0&quot; class=&quot;entry-ccl-by&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png&quot; alt=&quot;저작자 표시&quot;/&gt;
	&lt;img id=&quot;ccl-icon-440-1&quot; class=&quot;entry-ccl-nc&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png&quot; alt=&quot;비영리&quot;/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
		&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-fr/2.0/kr/&quot; /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-fr/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;
			&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/440&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>C/C++</category>
			<category>소멸자</category>
			<author>　환타</author>
			<guid>http://zfanta.com/440</guid>
			<comments>http://zfanta.com/entry/%EC%95%84-%EC%86%8C%EB%A9%B8%EC%9E%90%EA%B0%80-%EC%82%AC%EB%9E%8C-%EC%9E%A1%EC%95%84%EC%9A%94#entry440comment</comments>
			<pubDate>Sun, 15 Feb 2009 21:39:23 +0900</pubDate>
		</item>
		<item>
			<title>C언어 스도쿠 자동풀이 프로그램</title>
			<link>http://zfanta.com/entry/C%EC%96%B8%EC%96%B4-%EC%8A%A4%EB%8F%84%EC%BF%A0-%EC%9E%90%EB%8F%99%ED%92%80%EC%9D%B4-%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%A8</link>
			<description>&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal; &quot;&gt;프로그램 다운로드&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left; &quot;&gt;&lt;div class=&quot;imageblock&quot; style=&quot;display:inline;&quot;&gt;&lt;a href=&quot;http://zfanta.tistory.com/attachment/498ff4bf00d04CN.zip&quot;&gt;&lt;img src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/blog/image/extension/zip.gif&quot; alt=&quot;&quot; style=&quot;vertical-align: middle;&quot; /&gt; 스도쿠.zip&lt;/a&gt;&lt;/div&gt;&lt;button class=&quot;txc-file &quot; style=&quot;background-color: transparent; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; display: block; text-align: left; color: rgb(51, 51, 51); font-size: 12px; font-family: 굴림, gulim, sans-serif; margin-top: 3px; margin-right: 0pt; margin-bottom: 6px; margin-left: 0pt; &quot;&gt;&lt;br /&gt;
&lt;/button&gt;&lt;/div&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 100%; margin-top: 1px; margin-bottom: 1px; height: 2817px; &quot;&gt;
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;memory.h&gt;


int table[9][9];	//입력한 스도쿠 저장
int completed=0;	//완성된 스도쿠 갯수 저장
FILE *out;

typedef struct This		//빈칸을 가리키는 연결리스트
{
	int y,x;			//y행, x열 좌표
	int cand[10];		//후보숫자 표시배열
	struct This *next;	//다음칸
}blank;

blank *head, *tail;

//끝났는지 확인
int end()
{
	int i,j;

	for(i=0; i&lt;9; i++)
		for(j=0; j&lt;9; j++)
			if(table[i][j]==0)	//빈 칸이 있으면
				return 0;		//0리턴
	return 1;
}

//입력
int input()
{
	int i,j;
	FILE *in=fopen(&quot;table.txt&quot;,&quot;r&quot;);

	if(in==NULL)
		return 0;

	for(i=0; i&lt;9; i++)
		for(j=0; j&lt;9; j++)
			fscanf(in,&quot; %1d&quot;,&amp;table[i][j]);
	fclose(in);
	return 1;
}

//출력
void output()
{
	int i,j;

	printf(&quot;%d 개 완성 더 만들어?\n입력따윈 ㅇ벗어 싫으면 그냥 꺼\n&quot;, ++completed);
	system(&quot;PAUSE&quot;);

	fprintf(out,&quot;%d :\n&quot;, completed);		//완성햇던 스도쿠의 갰수 출력
	for(i=0; i&lt;9; i++, fprintf(out,&quot;\n&quot;))
		for(j=0; j&lt;9; j++)
			fprintf(out,&quot; %d&quot;,table[i][j]);
}

//y열에 쓸 수 있는 후보숫자를 a배열에 표시
void row(int y,int *a)
{
	int i;
	for(i=0; i&lt;9; i++)
		if(table[y][i]!=0)				//0이 아니면(이미 쓴 숫자면)
			a[table[y][i]]=0;			//a[쓰인 숫자]에 0(flase)표시
}

void col(int x,int *a)					//x열에 쓸 수 있는 후보숫자를 a배열에 표시
{
	int i;
	for(i=0; i&lt;9; i++)
		if(table[i][x]!=0)				//0이 아니면(이미 쓴 숫자면)
			a[table[i][x]]=0;			//a[쓰인 숫자]에 0(flase)표시
}

//y행, x열이 포함된 3x3영역 에 쓸 수 있는 후보숫자를 a배열에 표시
void big(int y, int x, int *a)
{
	int i,j;
	for(i=y; i&lt;y+3; i++)
		for(j=x; j&lt;x+3; j++)
			if(table[i][j]!=0)			//0이 아니면(이미 쓴 숫자면)
				a[table[i][j]]=0;		//a[쓰인 숫자]에 0(flase)표시
}

//a, b, c후보숫자 배열의 교집합부분을 구함
void samesame(int *a, int *b, int *c)
{
	int i;
	for(i=1; i&lt;=9;i++)
		a[i]=a[i]&amp;b[i]&amp;c[i];			//셋 다 1이면 1저장, 하나라도 0이면 0저장
}

//y행 x열칸에 쓸 수 있는 후보숫자를 구해 a에 표시
void get_cand(int y, int x, int *a)
{
	int i,j;
	int cand[3][10];
	for(i=0; i&lt;3; i++)					//여기부터
		for(j=0; j&lt;10; j++)				//
			cand[i][j]=1;				//여기까지 1로 초기화
	
	row(y,cand[0]);						//y행에 쓸 수 있는 후보숫자를 cand[0]배열에 저장
	col(x,cand[1]);						//x열에 쓸 수 있는 후보숫자를 cand[1]배열에 저장
	big((y/3)*3,(x/3)*3,cand[2]);		//y행, x열이 포함된 3x3영역 에 쓸 수 있는 후보숫자를 cand[0]배열에 저장
	samesame(cand[0],cand[1],cand[2]);	//위에서 구한 cand[0],cand[1],cand[2]배열의 교집합을 구해 cand[0]에 결과 저장
	memcpy(a,cand[0],sizeof(int)*10);	//a에 cand[0]복사
}

//빈 칸을 가리키는 연결리스트 생성
void set()
{
	int y, x;
	blank *temp;

	temp=(blank *)malloc(sizeof(blank));
	head=(blank *)malloc(sizeof(blank));
	tail=(blank *)malloc(sizeof(blank));
	temp=head;

	for(y=0; y&lt;9; y++)
	{
		for(x=0; x&lt;9; x++)
		{
			if(table[y][x]==0)		//빈 칸이면
			{
				temp-&gt;y=y;			//연결리스트에 저장하고
				temp-&gt;x=x;
				temp-&gt;next=(blank *)malloc(sizeof(blank));
				temp=temp-&gt;next;	//다음 연결리스트를 가리킴
			}
		}
	}
	tail=temp;
}

void solve(blank *node)
{
	int i;

	if(node==tail)		//끝까지 왔으면
	{
		if( end() )		//풀렸으면
			output();	//출력
		return;
	}


	get_cand(node-&gt;y,node-&gt;x,node-&gt;cand);	//후보숫자구함

	for(i=1; i&lt;=9; i++)
	{
		if(node-&gt;cand[i])					//쓸 수 있는 숫자면
		{
			table[node-&gt;y][node-&gt;x]=i;		//쓰고
			solve(node-&gt;next);				//다음칸으로 넘어감
			table[node-&gt;y][node-&gt;x]=0;		//다음 풀이에 영향을 주지 않기 위해 0으로 지움
		}
	}
}


int main()
{
	if( input()== 0)		//입력받고
	{
		printf(&quot;파일 입력 오류&quot;);
		return 0;
	}

	out=fopen(&quot;output.txt&quot;,&quot;w&quot;);
	set();				//빈칸 연결리스트생성
	solve(head);		//백트래킹으로 풀이
	fclose(out);

}
&lt;/textarea&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal;&quot;&gt;프로그램 다운로드&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;div class=&quot;imageblock&quot; style=&quot;display:inline;&quot;&gt;&lt;a href=&quot;http://zfanta.tistory.com/attachment/498ff4bf00d04CN.zip&quot;&gt;&lt;img src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/blog/image/extension/zip.gif&quot; alt=&quot;&quot; style=&quot;vertical-align: middle;&quot; /&gt; 스도쿠.zip&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: normal;&quot;&gt;&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
table.txt 파일에 스도쿠랑 똑같이 입력해주시면 됩니다. 빈칸은 0으로&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
입력확인같은건안해요.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
5초이내에 안끝나면 잘못입력했는지 확인해보세요.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div class=&quot;entry-ccl&quot; style=&quot;clear: both; text-align: right; margin-bottom: 10px&quot;&gt;
	&lt;img id=&quot;ccl-icon-439-0&quot; class=&quot;entry-ccl-by&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png&quot; alt=&quot;저작자 표시&quot;/&gt;
	&lt;img id=&quot;ccl-icon-439-1&quot; class=&quot;entry-ccl-nc&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png&quot; alt=&quot;비영리&quot;/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
		&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-fr/2.0/kr/&quot; /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-fr/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;
			&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-news-widget&quot; style=&quot;width: 100%; text-align: center&quot;&gt;
		  					&lt;embed src=&quot;http://api.v.daum.net/static/recombox1.swf&quot; quality=&quot;high&quot; flashvars=&quot;nid=2512122&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;false&quot; bgcolor=&quot;#ffffff&quot; width=&quot;400&quot; height=&quot;80&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot;&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/439&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>C/C++</category>
			<category>스도쿠</category>
			<category>프로그램</category>
			<author>　환타</author>
			<guid>http://zfanta.com/439</guid>
			<comments>http://zfanta.com/entry/C%EC%96%B8%EC%96%B4-%EC%8A%A4%EB%8F%84%EC%BF%A0-%EC%9E%90%EB%8F%99%ED%92%80%EC%9D%B4-%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%A8#entry439comment</comments>
			<pubDate>Mon, 09 Feb 2009 18:20:57 +0900</pubDate>
		</item>
		<item>
			<title>웹페이지 오른쪽 마우스 클릭방지 해제 스크립트</title>
			<link>http://zfanta.com/entry/%EC%9B%B9%ED%8E%98%EC%9D%B4%EC%A7%80-%EC%98%A4%EB%A5%B8%EC%AA%BD-%EB%A7%88%EC%9A%B0%EC%8A%A4-%ED%81%B4%EB%A6%AD%EB%B0%A9%EC%A7%80-%ED%95%B4%EC%A0%9C-%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8</link>
			<description>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(51, 51, 51);&quot;&gt;&lt;div&gt;
즐겨찾기에 추가하고 사용하세요.&lt;/div&gt;
&lt;div&gt;이게 제일 확실한 것 같아요&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
javascript:function r(d){d.oncontextmenu=null;d.onselectstart=null;d.ondragstart=null;d.onkeydown=null;d.onmousedown=null; d.body.oncontextmenu=null;d.body.onselectstart=null;d.body.ondragstart=null;d.body.onkeydown=null; d.body.onmousedown=null;};function unify(w){r(w.document);if(w.frames.length&gt;0){for(var i=0;i&amp;lt;w.frames.length;i++){try{unify(w.frames[i].window);}catch(e){}};};}; unify(self);&lt;/span&gt;&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(51, 51, 51);&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(51, 51, 51);&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(51, 51, 51);&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(51, 51, 51);&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;

&lt;textarea name=&quot;code&quot; class=&quot;jscript&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 646px; margin-top: 1px; margin-bottom: 1px; height: 517px; &quot;&gt;
javascript:
function r(d)
{
	d.oncontextmenu=null;
	d.onselectstart=null;
	d.ondragstart=null;
	d.onkeydown=null;
	d.onmousedown=null;
	d.body.oncontextmenu=null;
	d.body.onselectstart=null;
	d.body.ondragstart=null;
	d.body.onkeydown=null;
	d.body.onmousedown=null;
};

function unify(w)
{
	r(w.document);
	if(w.frames.length&gt;0)
	{
		for(var i=0;i&lt;w.frames.length;i++)
		{
			try
			{
				unify(w.frames[i].window);
			}
			catch(e)
			{
			}
		};
	};
}; 
unify(self);
&lt;/textarea&gt;&lt;div class=&quot;entry-ccl&quot; style=&quot;clear: both; text-align: right; margin-bottom: 10px&quot;&gt;
	&lt;img id=&quot;ccl-icon-436-0&quot; class=&quot;entry-ccl-by&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black01.png&quot; alt=&quot;저작자 표시&quot;/&gt;
	&lt;img id=&quot;ccl-icon-436-1&quot; class=&quot;entry-ccl-nc&quot; src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/static/admin/editor/ccl_black02.png&quot; alt=&quot;비영리&quot;/&gt;
	&lt;!--
	&lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
		&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-fr/2.0/kr/&quot; /&gt;
		&lt;/Work&gt;
		&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-fr/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;
			&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;
		&lt;/License&gt;
	&lt;/rdf:RDF&gt;
	--&gt;
&lt;/div&gt;
&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-news-widget&quot; style=&quot;width: 100%; text-align: center&quot;&gt;
		  					&lt;embed src=&quot;http://api.v.daum.net/static/recombox1.swf&quot; quality=&quot;high&quot; flashvars=&quot;nid=2445757&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;false&quot; bgcolor=&quot;#ffffff&quot; width=&quot;400&quot; height=&quot;80&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot;&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/436&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>정보 소식</category>
			<category>우클릭</category>
			<category>우클릭방지</category>
			<author>　환타</author>
			<guid>http://zfanta.com/436</guid>
			<comments>http://zfanta.com/entry/%EC%9B%B9%ED%8E%98%EC%9D%B4%EC%A7%80-%EC%98%A4%EB%A5%B8%EC%AA%BD-%EB%A7%88%EC%9A%B0%EC%8A%A4-%ED%81%B4%EB%A6%AD%EB%B0%A9%EC%A7%80-%ED%95%B4%EC%A0%9C-%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8#entry436comment</comments>
			<pubDate>Thu, 29 Jan 2009 16:54:18 +0900</pubDate>
		</item>
		<item>
			<title>삼각형 넓이구하기 프로그래밍 - 헤론의 공식</title>
			<link>http://zfanta.com/entry/%EC%82%BC%EA%B0%81%ED%98%95-%EB%84%93%EC%9D%B4%EA%B5%AC%ED%95%98%EA%B8%B0-%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D-%ED%97%A4%EB%A1%A0%EC%9D%98-%EA%B3%B5%EC%8B%9D</link>
			<description>&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
중학교에선 4,5,6의 세 변을 가진 삼각형넓이를 구할 땐&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;imageblock left&quot; style=&quot;float: left; margin-right: 10px;&quot;&gt;&lt;a href=&quot;http://cfs12.tistory.com/original/22/tistory/2009/01/08/20/04/4965ddd090927&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfs12.tistory.com/image/22/tistory/2009/01/08/20/04/4965ddd090927&quot; alt=&quot;&quot; filemime=&quot;&quot; filename=&quot;18.jpg&quot; height=&quot;344&quot; width=&quot;314&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
h2 = 42 - (6-x)2 = 52 - x2&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
16 - (36 - 12x + x2) = 25 - x2&lt;/div&gt;
&lt;div&gt;
16 - 36 + 12x = 25&lt;/div&gt;
&lt;div&gt;
x = 15/4&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
h2 = 52 - x2&lt;/div&gt;
&lt;div&gt;
h2 = 400/16 - 225/16 = 175/16&lt;/div&gt;
&lt;div&gt;
h = &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal; white-space: pre-wrap; &quot;&gt;√175/4 = 5√7/4&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal; white-space: pre-wrap;&quot;&gt;넓이 = 6 x 5√7/4 x 1/2&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal; white-space: pre-wrap;&quot;&gt;넓이 = 15√7/4&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
이런 방법을 알려줍니다.. 삼각형을 2개의 직각삼각형으로 나누어서 계산하는 것이죠.&lt;/div&gt;
&lt;div&gt;
참 싫죠?&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
헤론의 공식&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;imageblock left&quot; style=&quot;float: left; margin-right: 10px;&quot;&gt;&lt;a href=&quot;http://cfs12.tistory.com/original/12/tistory/2009/01/08/20/10/4965df4021882&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfs12.tistory.com/image/12/tistory/2009/01/08/20/10/4965df4021882&quot; alt=&quot;&quot; filemime=&quot;&quot; filename=&quot;h.jpg&quot; height=&quot;218&quot; width=&quot;375&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal; white-space: pre-wrap; &quot;&gt;√{s(s-a)(s-b)(s-c)}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal; white-space: pre-wrap;&quot;&gt;s = (a+b+c)/2&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal; white-space: pre-wrap;&quot;&gt;s = (4+5+6)/2 = 15/2&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal; white-space: pre-wrap;&quot;&gt;넓이 = √{(15/2)x(7/2)x(5/2)x(3/2)} = √(1575/16) = 15√7/4&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
참 쉽죠? s는 넓이가 아니라는거 조심하시고.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 562px; margin-top: 1px; margin-bottom: 1px; height: 1233px; &quot;&gt;
#include &lt;stdio.h&gt;
#include &lt;math.h&gt;

void gettri()
{
	int a, b, c, tmp;
	int numer;			//분자
	int i, cnt;
	int x=1,y=1,z=4;	//(x√b)/z

	printf(&quot;입력(a b c) : &quot;);
	scanf(&quot; %d %d %d&quot;, &amp;a, &amp;b, &amp;c);
	if(a&gt;b)
	{
		tmp=a;
		a=b;
		b=tmp;
	}
	if(b&gt;c)
	{
		tmp=b;
		b=c;
		c=tmp;
	}
	if(a+b&lt;=c)
	{
		printf(&quot;삼각형이 아니잖아\n&quot;);
		return;
	}

	numer=(a+b+c) * (-a+b+c) * (a-b+c) * (a+b-c);

	i=2;
	while(numer!=1)			//소인수분해로 무리수를 a√b로
	{
		cnt=0;
		while(numer%i==0)
		{
			cnt++;
			numer/=i;
		}
		if((int)(cnt/2))
			x=x*pow(i,(int)(cnt/2));
		if(cnt%2)
			y=y*i;
		i++;
	}
	if(x%4==0)			//약분
	{
		x/=4;
		z=1;
	}
	else if(x%2==0)		//여기도 약분
	{
		x/=2;
		z=2;
	}

	if(y==1)
	{
		printf(&quot;%d&quot;,x);
	}
	else
	{
		if(x!=1)
			printf(&quot;%d&quot;,x);
		printf(&quot;√%d&quot;,y);
	}
	if(z!=1)
		printf(&quot;/%d&quot;,z);
	printf(&quot;\n&quot;);
}

main()
{
	while(1)
	{
		gettri();
	}

}&lt;/textarea&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: -webkit-monospace; font-size: 13px; line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-news-widget&quot; style=&quot;width: 100%; text-align: center&quot;&gt;
		  					&lt;embed src=&quot;http://api.v.daum.net/static/recombox1.swf&quot; quality=&quot;high&quot; flashvars=&quot;nid=2332141&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;false&quot; bgcolor=&quot;#ffffff&quot; width=&quot;400&quot; height=&quot;80&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot;&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/430&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>algorithm</category>
			<category>도형</category>
			<category>삼각형</category>
			<category>프로그래밍</category>
			<category>헤론</category>
			<author>　환타</author>
			<guid>http://zfanta.com/430</guid>
			<comments>http://zfanta.com/entry/%EC%82%BC%EA%B0%81%ED%98%95-%EB%84%93%EC%9D%B4%EA%B5%AC%ED%95%98%EA%B8%B0-%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D-%ED%97%A4%EB%A1%A0%EC%9D%98-%EA%B3%B5%EC%8B%9D#entry430comment</comments>
			<pubDate>Thu, 08 Jan 2009 20:17:48 +0900</pubDate>
		</item>
		<item>
			<title>삼성 코딩스타일 가이드</title>
			<link>http://zfanta.com/entry/%EC%82%BC%EC%84%B1-%EC%BD%94%EB%94%A9%EC%8A%A4%ED%83%80%EC%9D%BC-%EA%B0%80%EC%9D%B4%EB%93%9C</link>
			<description>&lt;div class=&quot;imageblock&quot; style=&quot;display:inline;&quot;&gt;&lt;a href=&quot;http://zfanta.tistory.com/attachment/495c3b4f6ac82E2.pdf&quot;&gt;&lt;img src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/blog/image/extension/pdf.gif&quot; alt=&quot;&quot; style=&quot;vertical-align: middle;&quot; /&gt; SamSungCodingStyle.pdf&lt;/a&gt;&lt;/div&gt;&lt;object type=&quot;application/pdf&quot; data=&quot;/attachment/495c3b4f6ac82E2.pdf&quot; width=&quot;720&quot; height=&quot;800&quot;&gt;&lt;param name=&quot;src&quot; value=&quot;/attachment/495c3b4f6ac82E2.pdf&quot;&gt;&lt;/object&gt;&lt;br /&gt;

&lt;div&gt;
&lt;div class=&quot;imageblock&quot; style=&quot;display:inline;&quot;&gt;&lt;a href=&quot;http://zfanta.tistory.com/attachment/495c3b4f6ac82E2.pdf&quot;&gt;&lt;img src=&quot;http://i1.daumcdn.net/cfs.tistory/v/0/blog/image/extension/pdf.gif&quot; alt=&quot;&quot; style=&quot;vertical-align: middle;&quot; /&gt; SamSungCodingStyle.pdf&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
이런거 신경쓰면서 Anycall PC Manager는 그따우로 만드나요?????????????????????????????????????&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;imageblock&quot; style=&quot;display:inline;&quot;&gt;&lt;a href=&quot;http://cfs14.tistory.com/original/22/tistory/2009/01/01/12/59/495c3f8663960&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfs14.tistory.com/image/22/tistory/2009/01/01/12/59/495c3f8663960&quot; alt=&quot;&quot; filemime=&quot;&quot; filename=&quot;건희.jpg&quot; height=&quot;5805&quot; width=&quot;487&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/426&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>정보 소식</category>
			<category>삼성</category>
			<category>코딩스타일</category>
			<author>　환타</author>
			<guid>http://zfanta.com/426</guid>
			<comments>http://zfanta.com/entry/%EC%82%BC%EC%84%B1-%EC%BD%94%EB%94%A9%EC%8A%A4%ED%83%80%EC%9D%BC-%EA%B0%80%EC%9D%B4%EB%93%9C#entry426comment</comments>
			<pubDate>Thu, 01 Jan 2009 15:44:41 +0900</pubDate>
		</item>
		<item>
			<title>비트연산자 활용 모음</title>
			<link>http://zfanta.com/entry/%EB%B9%84%ED%8A%B8%EC%97%B0%EC%82%B0%EC%9E%90-%ED%99%9C%EC%9A%A9-%EB%AA%A8%EC%9D%8C</link>
			<description>&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; width=&quot;100%&quot; style=&quot;table-layout: fixed; font-family: 굴림, Gulim, 돋움, Tahoma, Verdana, Arial, Helvetica; font-size: 9pt; line-height: 150%; &quot;&gt;
&lt;col width=&quot;100%&quot;&gt;&lt;tbody&gt;&lt;tr style=&quot;font-family: 굴림, Gulim, 돋움, Tahoma, Verdana, Arial, Helvetica; font-size: 9pt;  line-height: 150%; &quot;&gt;
&lt;td valign=&quot;top&quot; style=&quot;font-family: 굴림, Gulim, 돋움, Tahoma, Verdana, Arial, Helvetica; font-size: 9pt; line-height: 150%; &quot;&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html&quot; target=&quot;_blank&quot; style=&quot; text-decoration: none; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;font-size: 36pt; &quot;&gt;&lt;span style=&quot;font-size: 24pt; &quot;&gt;&lt;span style=&quot;font-size: 18pt; &quot;&gt;http://graphics.stanford.edu/~seander/bithacks.html&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 0); font-family: Gulim; font-size: 16px; line-height: normal; &quot;&gt;&lt;h3&gt;&lt;br /&gt;
&lt;/h3&gt;&lt;h3&gt;Contents&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#OperationCounting&quot;&gt;About the operation counting methodology&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#CopyIntegerSign&quot;&gt;Compute the sign of an integer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#IntegerAbs&quot;&gt;Compute the integer absolute value (abs) without branching&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#IntegerMinOrMax&quot;&gt;Compute the minimum (min) or maximum (max) of two integers without branching&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#DetermineIfPowerOf2&quot;&gt;Determining if an integer is a power of 2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Sign extending&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#FixedSignExtend&quot;&gt;Sign extending from a constant bit width&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#VariableSignExtend&quot;&gt;Sign extending from a variable bit-width&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#VariableSignExtendRisky&quot;&gt;Sign extending from a variable bit-width in 3 operations&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#ConditionalSetOrClearBitsWithoutBranching&quot;&gt;Conditionally set or clear bits without branching&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#MaskedMerge&quot;&gt;Merge bits from two values according to a mask&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Counting bits set&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetNaive&quot;&gt;Counting bits set, naive way&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetTable&quot;&gt;Counting bits set by lookup table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetKernighan&quot;&gt;Counting bits set, Brian Kernighan's way&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSet64&quot;&gt;Counting bits set in 12, 24, or 32-bit words using 64-bit instructions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel&quot;&gt;Counting bits set, in parallel&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Computing parity (1 if an odd number of bits set, 0 otherwise)&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#ParityNaive&quot;&gt;Compute parity of a word the naive way&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#ParityLookupTable&quot;&gt;Compute parity by lookup table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#ParityWith64Bits&quot;&gt;Compute parity of a byte using 64-bit multiply and modulus division&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#ParityMultiply&quot;&gt;Compute parity of word with a multiply&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#ParityParallel&quot;&gt;Compute parity in parallel&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Swapping Values&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#SwappingValuesSubAdd&quot;&gt;Swapping values with subtraction and addition&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#SwappingValuesXOR&quot;&gt;Swapping values with XOR&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#SwappingBitsXOR&quot;&gt;Swapping individual bits with XOR&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Reversing bit sequences&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#BitReverseObvious&quot;&gt;Reverse bits the obvious way&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#BitReverseTable&quot;&gt;Reverse bits in word by lookup table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith64BitsDiv&quot;&gt;Reverse the bits in a byte with 3 operations (64-bit muliply and modulus division)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith64Bits&quot;&gt;Reverse the bits in a byte with 4 operations (64-bit multiply, no division)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith32Bits&quot;&gt;Reverse the bits in a byte with 7 operations (no 64-bit, only 32)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel&quot;&gt;Reverse an N-bit quantity in parallel with 5 * lg(N) operations&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Modulus division (aka computing &lt;em&gt;remainders&lt;/em&gt;)&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#ModulusDivisionEasy&quot;&gt;Computing modulus division by 1 &amp;lt;&amp;lt; s without a division operation (obvious)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#ModulusDivision&quot;&gt;Computing modulus division by (1 &amp;lt;&amp;lt; s) - 1 without a division operation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#ModulusDivisionParallel&quot;&gt;Computing modulus division by (1 &amp;lt;&amp;lt; s) - 1 in parallel without a division operation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Finding integer log base 2 of an integer (aka the position of the highest bit set)&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogObvious&quot;&gt;Find the log base 2 of an integer with the MSB N set in O(N) operations (the obvious way)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogIEEE64Float&quot;&gt;Find the integer log base 2 of an integer with an 64-bit IEEE float&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogLookup&quot;&gt;Find the log base 2 of an integer with a lookup table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog&quot;&gt;Find the log base 2 of an N-bit integer in O(lg(N)) operations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogDeBruijn&quot;&gt;Find the log base 2 of an N-bit integer in O(lg(N)) operations with multiply and lookup&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog10&quot;&gt;Find integer log base 10 of an integer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog10Obvious&quot;&gt;Find integer log base 10 of an integer the obvious way&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogFloat&quot;&gt;Find integer log base 2 of a 32-bit IEEE float&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogRootFloat&quot;&gt;Find integer log base 2 of the pow(2, r)-root of a 32-bit IEEE float (for unsigned integer r)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Counting consecutive trailing zero bits (or finding bit indices)&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightLinear&quot;&gt;Count the consecutive zero bits (trailing) on the right linearly&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightParallel&quot;&gt;Count the consecutive zero bits (trailing) on the right in parallel&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightBinSearch&quot;&gt;Count the consecutive zero bits (trailing) on the right by binary search&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightFloatCast&quot;&gt;Count the consecutive zero bits (trailing) on the right by casting to a float&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightModLookup&quot;&gt;Count the consecutive zero bits (trailing) on the right with modulus division and lookup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightMultLookup&quot;&gt;Count the consecutive zero bits (trailing) on the right with multiply and lookup&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2Float&quot;&gt;Round up to the next highest power of 2 by float casting&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2&quot;&gt;Round up to the next highest power of 2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Interleaving bits (aka computing &lt;em&gt;Morton Numbers&lt;/em&gt;)&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#InterleaveTableObvious&quot;&gt;Interleave bits the obvious way&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#InterleaveTableLookup&quot;&gt;Interleave bits by table lookup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#Interleave64bitOps&quot;&gt;Interleave bits with 64-bit multiply&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#InterleaveBMN&quot;&gt;Interleave bits by Binary Magic Numbers&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Testing for ranges of bytes in a word (and counting occurances found)&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#ZeroInWord&quot;&gt;Determine if a word has a zero byte&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#HasLessInWord&quot;&gt;Determine if a word has byte less than n&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#HasMoreInWord&quot;&gt;Determine if a word has a byte greater than n&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#HasBetweenInWord&quot;&gt;Determine if a word has a byte between m and n&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: 18pt; &quot;&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;a href=&quot;http://bits.stephan-brumme.com/&quot; target=&quot;_blank&quot; style=&quot;text-decoration: none; &quot;&gt;http://bits.stephan-brumme.com/&lt;/a&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(51, 51, 51); font-family: Verdana; font-size: 12px; line-height: normal; &quot;&gt;&lt;table style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;• February 11, 2007:&lt;/td&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;&lt;a href=&quot;http://bits.stephan-brumme.com/sign.html&quot; style=&quot;color: rgb(68, 85, 136); &quot;&gt;Sign of a 32 bit integer&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;• February 11, 2007:&lt;/td&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;&lt;a href=&quot;http://bits.stephan-brumme.com/invSquareRoot.html&quot; style=&quot;color: rgb(68, 85, 136); &quot;&gt;Float inverse square root approximation&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;• February 7, 2007:&lt;/td&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;&lt;a href=&quot;http://bits.stephan-brumme.com/null.html&quot; style=&quot;color: rgb(68, 85, 136); &quot;&gt;Detects zero bytes inside a 32 bit integer&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;• January 31, 2007:&lt;/td&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;&lt;a href=&quot;http://bits.stephan-brumme.com/minmax.html&quot; style=&quot;color: rgb(68, 85, 136); &quot;&gt;Minimum / maximum of integers&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;• January 31, 2007:&lt;/td&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;&lt;a href=&quot;http://bits.stephan-brumme.com/absInteger.html&quot; style=&quot;color: rgb(68, 85, 136); &quot;&gt;Absolute value of an integer&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;• January 28, 2007:&lt;/td&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;&lt;a href=&quot;http://bits.stephan-brumme.com/endianess.html&quot; style=&quot;color: rgb(68, 85, 136); &quot;&gt;Endianess&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;• January 28, 2007:&lt;/td&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;&lt;a href=&quot;http://bits.stephan-brumme.com/roundUpToNextPowerOfTwo.html&quot; style=&quot;color: rgb(68, 85, 136); &quot;&gt;Round up to the next power of two&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;• January 28, 2007:&lt;/td&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;&lt;a href=&quot;http://bits.stephan-brumme.com/lowestBitSet.html&quot; style=&quot;color: rgb(68, 85, 136); &quot;&gt;Position of lowest bit set&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;• February 11, 2007:&lt;/td&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;&lt;a href=&quot;http://bits.stephan-brumme.com/inverse.html&quot; style=&quot;color: rgb(68, 85, 136); &quot;&gt;Approximative inverse of a float&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;• February 7, 2007:&lt;/td&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;&lt;a href=&quot;http://bits.stephan-brumme.com/squareRoot.html&quot; style=&quot;color: rgb(68, 85, 136); &quot;&gt;Float square root approximation&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;• January 31, 2007:&lt;/td&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;&lt;a href=&quot;http://bits.stephan-brumme.com/absFloat.html&quot; style=&quot;color: rgb(68, 85, 136); &quot;&gt;Absolute value of a float&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;• January 28, 2007:&lt;/td&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;&lt;a href=&quot;http://bits.stephan-brumme.com/countBits.html&quot; style=&quot;color: rgb(68, 85, 136); &quot;&gt;Count bits set in parallel a.k.a. Population Count&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;• January 28, 2007:&lt;/td&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;&lt;a href=&quot;http://bits.stephan-brumme.com/parity.html&quot; style=&quot;color: rgb(68, 85, 136); &quot;&gt;Parity&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;• January 28, 2007:&lt;/td&gt;
&lt;td class=&quot;interlinks&quot; style=&quot;font-family: inherit; font-size: 0.8em; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 5px; white-space: nowrap; vertical-align: top; &quot;&gt;&lt;a href=&quot;http://bits.stephan-brumme.com/isPowerOfTwo.html&quot; style=&quot;color: rgb(68, 85, 136); &quot;&gt;Is power of two&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;
네......................&lt;br /&gt;
영어입니다.&lt;br /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/span&gt;&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-news-widget&quot; style=&quot;width: 100%; text-align: center&quot;&gt;
		  					&lt;embed src=&quot;http://api.v.daum.net/static/recombox1.swf&quot; quality=&quot;high&quot; flashvars=&quot;nid=2276852&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;false&quot; bgcolor=&quot;#ffffff&quot; width=&quot;400&quot; height=&quot;80&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot;&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/425&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>C/C++</category>
			<category>비트연산</category>
			<category>비트연산자</category>
			<author>　환타</author>
			<guid>http://zfanta.com/425</guid>
			<comments>http://zfanta.com/entry/%EB%B9%84%ED%8A%B8%EC%97%B0%EC%82%B0%EC%9E%90-%ED%99%9C%EC%9A%A9-%EB%AA%A8%EC%9D%8C#entry425comment</comments>
			<pubDate>Mon, 29 Dec 2008 20:54:26 +0900</pubDate>
		</item>
		<item>
			<title>아 다풀었다 ㅋㅋㅋㅋ</title>
			<link>http://zfanta.com/entry/%EC%95%84-%EB%8B%A4%ED%92%80%EC%97%88%EB%8B%A4-%E3%85%8B%E3%85%8B%E3%85%8B%E3%85%8B</link>
			<description>&lt;div class=&quot;imageblock&quot; style=&quot;display:inline;&quot;&gt;&lt;a href=&quot;http://cfs13.tistory.com/original/7/tistory/2008/10/26/22/08/49046bd79f649&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfs13.tistory.com/image/7/tistory/2008/10/26/22/08/49046bd79f649&quot; alt=&quot;&quot; filemime=&quot;&quot; filename=&quot;2008-10-2622;00;19.jpg&quot; height=&quot;527&quot; width=&quot;720&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;알고리즘 문제는 다풀었네요.&lt;br /&gt;
(근데 저 여자분은 누구???)&lt;br /&gt;
&lt;br /&gt;중간에 자료구조를 직접 만들어야하는 변태문제도 나오는데.....&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;imageblock&quot; style=&quot;display:inline;&quot;&gt;&lt;a href=&quot;http://cfs13.tistory.com/original/20/tistory/2008/10/26/22/08/49046be124e0e&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfs13.tistory.com/image/20/tistory/2008/10/26/22/08/49046be124e0e&quot; alt=&quot;&quot; filemime=&quot;&quot; filename=&quot;최면.jpg&quot; height=&quot;338&quot; width=&quot;613&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
ㅂ2ㅂ2&lt;br /&gt;
&lt;br /&gt;&lt;A title=&quot;[http://simples.co.kr/RCEZone]로 이동합니다.&quot; href=&quot;http://simples.co.kr/RCEZone&quot; target=_blank&gt;문제풀러가기&lt;/A&gt;&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/415&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>뻘소리</category>
			<category>simples</category>
			<category>프로그래밍</category>
			<author>　환타</author>
			<guid>http://zfanta.com/415</guid>
			<comments>http://zfanta.com/entry/%EC%95%84-%EB%8B%A4%ED%92%80%EC%97%88%EB%8B%A4-%E3%85%8B%E3%85%8B%E3%85%8B%E3%85%8B#entry415comment</comments>
			<pubDate>Sun, 26 Oct 2008 22:11:26 +0900</pubDate>
		</item>
		<item>
			<title>아나 안해</title>
			<link>http://zfanta.com/entry/%EC%95%84%EB%82%98-%EC%95%88%ED%95%B4</link>
			<description>&lt;div class=&quot;imageblock center&quot; style=&quot;text-align: center; clear: both;&quot;&gt;&lt;a href=&quot;http://cfs14.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczE0LnRpc3RvcnkuY29tOi9hdHRhY2gvMC8wLmpwZw%3D%3D&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfs14.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczE0LnRpc3RvcnkuY29tOi9hdHRhY2gvMC8wLmpwZw%3D%3D&quot; alt=&quot;사용자 삽입 이미지&quot; height=&quot;345&quot; width=&quot;401&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;imageblock center&quot; style=&quot;text-align: center; clear: both;&quot;&gt;&lt;a href=&quot;http://cfs11.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczExLnRpc3RvcnkuY29tOi9hdHRhY2gvMC8wLmpwZw%3D%3D&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfs11.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczExLnRpc3RvcnkuY29tOi9hdHRhY2gvMC8wLmpwZw%3D%3D&quot; alt=&quot;사용자 삽입 이미지&quot; height=&quot;489&quot; width=&quot;720&quot;/&gt;&lt;/a&gt;&lt;/div&gt;안해&lt;br /&gt;&lt;img src=&quot;http://cfs12.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczEyLnRpc3RvcnkuY29tOi9hdHRhY2gvMC8wLmdpZg%3D%3D&quot; width=&quot;233&quot; height=&quot;205&quot; /&gt;&lt;br /&gt;&lt;br /&gt;StolenByte가 뭔가요?&lt;br /&gt;&lt;br /&gt;&lt;A href=&quot;http://simples.co.kr/&quot; target=_blank&gt;simples&lt;/A&gt;에서 하는건데 어렵네요.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Crackme 05는 뭔소린지 슈우바&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/412&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>뻘소리</category>
			<category>crack</category>
			<category>simples</category>
			<category>Unpacking</category>
			<author>　환타</author>
			<guid>http://zfanta.com/412</guid>
			<comments>http://zfanta.com/entry/%EC%95%84%EB%82%98-%EC%95%88%ED%95%B4#entry412comment</comments>
			<pubDate>Fri, 10 Oct 2008 18:11:19 +0900</pubDate>
		</item>
		<item>
			<title>주민등록번호 노출에 대한 다음의 반응.</title>
			<link>http://zfanta.com/entry/%EC%A3%BC%EB%AF%BC%EB%93%B1%EB%A1%9D%EB%B2%88%ED%98%B8-%EB%85%B8%EC%B6%9C%EC%97%90-%EB%8C%80%ED%95%9C-%EB%8B%A4%EC%9D%8C%EC%9D%98-%EB%B0%98%EC%9D%91</link>
			<description>&lt;P&gt;참고 : &lt;A href=&quot;http://zfanta.com/entry/다음의-개인정보-보호-장난쳐&quot; target=_blank&gt;다음의 개인정보 보호 장난쳐?&lt;/A&gt;&lt;br /&gt;&lt;br /&gt;1:1문의 메일을 저 글 링크와 함께 보냈다.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;imageblock center&quot; style=&quot;text-align: center; clear: both;&quot;&gt;&lt;a href=&quot;http://cfs8.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczgudGlzdG9yeS5jb206L2F0dGFjaC8wLzI0MDAwMDAwMDAwMC5qcGc%3D&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfs8.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczgudGlzdG9yeS5jb206L2F0dGFjaC8wLzI0MDAwMDAwMDAwMC5qcGc%3D&quot; alt=&quot;사용자 삽입 이미지&quot; height=&quot;378&quot; width=&quot;611&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;Daum에서는 해당되지 않는 자료이며.&lt;br /&gt;비밀번호는 암호화로 저장되기 때문에,&lt;br /&gt;반드시 일치해야 다음단계로 진행,&lt;br /&gt;성실히 답변해 드리겠습니다.&lt;br /&gt;&lt;br /&gt;아 이분 제 글 읽지 않고 상담원 안내서에 있는 거 그대로 보내주신 듯합니다. 저는 주민등록번호에 관해 문의드렸는데 비밀번호얘기만 하시네요. 만약 주민등록번호가 암호화되어있다면..........&lt;br /&gt;&lt;STRONG&gt;&lt;FONT size=4&gt;친절한 다음씨께서 폰 인증할 때 DB에 암호화되어 저장되어있는 주민등록번호를 다시 복호화하여 자동으로 입력시켜주는구요.&lt;br /&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;br /&gt;&lt;img src=&quot;http://cfs7.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczcudGlzdG9yeS5jb206L2F0dGFjaC8wLzI0MDAwMDAwMDAwMC5qcGc%3D&quot; width=&quot;640&quot; height=&quot;480&quot; /&gt;&lt;br /&gt;&lt;STRONG&gt;&lt;FONT size=4&gt;&lt;br /&gt;그딴 거 개나 줘버려&lt;/FONT&gt;&lt;/STRONG&gt;&lt;br /&gt;&lt;br /&gt;복호화 못하게 암호화하고 저장해야하는 거 아닌가요?&lt;br /&gt;그리고 답변좀 성실히 해주세요 ㅜㅜ&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-news-widget&quot; style=&quot;width: 100%; text-align: center&quot;&gt;
		  					&lt;embed src=&quot;http://api.v.daum.net/static/recombox1.swf&quot; quality=&quot;high&quot; flashvars=&quot;nid=1742477&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;false&quot; bgcolor=&quot;#ffffff&quot; width=&quot;400&quot; height=&quot;80&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot;&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/405&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>정보 소식</category>
			<category>Daum</category>
			<category>개인정보 유출</category>
			<category>개인정보보호</category>
			<author>　환타</author>
			<guid>http://zfanta.com/405</guid>
			<comments>http://zfanta.com/entry/%EC%A3%BC%EB%AF%BC%EB%93%B1%EB%A1%9D%EB%B2%88%ED%98%B8-%EB%85%B8%EC%B6%9C%EC%97%90-%EB%8C%80%ED%95%9C-%EB%8B%A4%EC%9D%8C%EC%9D%98-%EB%B0%98%EC%9D%91#entry405comment</comments>
			<pubDate>Thu, 04 Sep 2008 18:13:13 +0900</pubDate>
		</item>
		<item>
			<title>다음의 개인정보 보호 장난쳐?</title>
			<link>http://zfanta.com/entry/%EB%8B%A4%EC%9D%8C%EC%9D%98-%EA%B0%9C%EC%9D%B8%EC%A0%95%EB%B3%B4-%EB%B3%B4%ED%98%B8-%EC%9E%A5%EB%82%9C%EC%B3%90</link>
			<description>&lt;p&gt;오늘 다음에 비밀번호변경하러 들어갔...........&lt;br /&gt;&lt;div class=&quot;imageblock center&quot; style=&quot;text-align: center; clear: both;&quot;&gt;&lt;a href=&quot;http://cfs9.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczkudGlzdG9yeS5jb206L2F0dGFjaC8wLzIwMDAwMDAwMDAwMS5qcGc%3D&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfs9.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczkudGlzdG9yeS5jb206L2F0dGFjaC8wLzIwMDAwMDAwMDAwMS5qcGc%3D&quot; alt=&quot;사용자 삽입 이미지&quot; height=&quot;201&quot; width=&quot;407&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;는데 번호가 옛 번호라서 번호수정을 클릭하였습니다.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;imageblock center&quot; style=&quot;text-align: center; clear: both;&quot;&gt;&lt;a href=&quot;http://cfs9.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczkudGlzdG9yeS5jb206L2F0dGFjaC8wLzIwMDAwMDAwMDAwMi5qcGc%3D&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfs9.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczkudGlzdG9yeS5jb206L2F0dGFjaC8wLzIwMDAwMDAwMDAwMi5qcGc%3D&quot; alt=&quot;사용자 삽입 이미지&quot; height=&quot;254&quot; width=&quot;425&quot;/&gt;&lt;/a&gt;&lt;/div&gt;주민등록번호 부분을 보면 별동그라미별동그라미별별동그라미로 되어있습니다. 설마하는 마음에.......&lt;br /&gt;설마&lt;br /&gt;설마&lt;br /&gt;설마&lt;br /&gt;설마&lt;br /&gt;설마&lt;br /&gt;설마&lt;br /&gt;설마&lt;br /&gt;설마&lt;br /&gt;소스를 보니 주민등록번호가 나와버립니다.. 뒷자리까지. &lt;br /&gt;앞자리 검색하니 옆에 잘 붙어있더라구요.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;imageblock center&quot; style=&quot;text-align: center; clear: both;&quot;&gt;&lt;a href=&quot;http://cfs8.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczgudGlzdG9yeS5jb206L2F0dGFjaC8wLzIwMDAwMDAwMDAwMS5qcGc%3D&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfs8.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczgudGlzdG9yeS5jb206L2F0dGFjaC8wLzIwMDAwMDAwMDAwMS5qcGc%3D&quot; alt=&quot;사용자 삽입 이미지&quot; height=&quot;266&quot; width=&quot;617&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;br /&gt;주민번호를 저렇게 출력해주는 건 암호화가 안돼있다는 거 아닌가요???????????????????????????????????&lt;br /&gt;이렇게 짜 놓으면 옛날옛적 윈디소프트가 당한 게 생각나는데&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;http://cfs9.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczkudGlzdG9yeS5jb206L2F0dGFjaC8wLzIwMDAwMDAwMDAwMy5naWY%3D&quot; width=&quot;300&quot; height=&quot;200&quot; /&gt;&lt;br /&gt;어쩔 거에요. 빨리 고쳐주시면................ 고마운데&lt;br /&gt;&lt;br /&gt;이 글을 볼지도 모르겠고.&lt;br /&gt;&lt;img src=&quot;http://cfs8.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczgudGlzdG9yeS5jb206L2F0dGFjaC8wLzIwMDAwMDAwMDAwMi5qcGc%3D&quot; width=&quot;450&quot; height=&quot;290&quot; /&gt;&lt;br /&gt;이렇게 되기 전에 어서~~~~~~&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;제 주민번호 앞자리는 930320입니다. 제 생일이 3월 20일이라는 소리죠.&lt;br /&gt;뭐 그냥 그렇다구요.ㅎㅎ &lt;br /&gt;
&lt;p align=&quot;center&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-news-widget&quot; style=&quot;width: 100%; text-align: center&quot;&gt;
		  					&lt;embed src=&quot;http://api.v.daum.net/static/recombox1.swf&quot; quality=&quot;high&quot; flashvars=&quot;nid=1716456&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;false&quot; bgcolor=&quot;#ffffff&quot; width=&quot;400&quot; height=&quot;80&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot;&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/404&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>정보 소식</category>
			<category>Daum</category>
			<category>개인정보</category>
			<category>개인정보보호</category>
			<category>다음</category>
			<author>　환타</author>
			<guid>http://zfanta.com/404</guid>
			<comments>http://zfanta.com/entry/%EB%8B%A4%EC%9D%8C%EC%9D%98-%EA%B0%9C%EC%9D%B8%EC%A0%95%EB%B3%B4-%EB%B3%B4%ED%98%B8-%EC%9E%A5%EB%82%9C%EC%B3%90#entry404comment</comments>
			<pubDate>Fri, 29 Aug 2008 17:46:24 +0900</pubDate>
		</item>
		<item>
			<title>C 소수판단 알고리즘</title>
			<link>http://zfanta.com/entry/C-%EC%86%8C%EC%88%98%ED%8C%90%EB%8B%A8-%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98</link>
			<description>&lt;p&gt;오랜만에 글 써보네요.&lt;br /&gt;
미안하지만 오늘 글은 모두 아는 소수 판단 알고리즘입니다. ㅈㅅㅈㅅㅈㅅ&lt;br /&gt;
&lt;br /&gt;
소수 : 1과 자신 외에는 나누어 떨어지는 정수가 없는 양의 정수.&lt;br /&gt;
&lt;br /&gt;
소수의 정의만 보면 2부터 n-1까지 나누어보아서 나누어지지 않으면 소수 나누어지면 소수가 아니라고 할 수 있습니다.&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 249px; margin-top: 1px; margin-bottom: 1px; height: 121px; &quot;&gt;
int prime(int n)
{
	int i;
	for(i=2;i&lt;n;i++)
		if(n%i==0)
			return 0;
	return 1;
}&lt;/textarea&gt;&lt;br /&gt;
&lt;br /&gt;
이 함수는 느리다. ㅡ,.ㅡ&lt;br /&gt;
소수를 판별할 때 n의 제곱근까지만 나누어 보면 된다고 한다.&lt;br /&gt;
&lt;br /&gt;
16을 보면 16의 약수는 1*16, 2*8, 3*6, 4*4, 6*3, 8*2, 16*2 이렇게 앞 뒤가 서로 대칭된다.&lt;br /&gt;
그래서 제곱근을 구해주는 합수 sqrt(int)함수를 써보겠습니다.&lt;br /&gt;
&lt;br /&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 261px; margin-top: 1px; margin-bottom: 1px; height: 172px; &quot;&gt;
int prime(int n)
{
	int i, sqrn;
	sqrn = (int)sqrt(n);
	for (i = 2; i &lt;= sqrn; i++)
		if (n % i == 0)
			return 0;

	return 1;
}&lt;/textarea&gt;&lt;br /&gt;
&lt;br /&gt;
 소수를 구하는 다른 알고리즘에는 에라토스의 체가 있습니다. &lt;br /&gt;
1부터 n까지의 소수를 구한다고 할 때 소수의 배수를 지워나가면서 남아있는 수를 구하는 알고리즘입니다.&lt;br /&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 542px; margin-top: 1px; margin-bottom: 1px; height: 356px; &quot;&gt;
main()
{
	int *arr;
	int i,j;

	arr=(int *)calloc(101,sizeof(int));//0부터 100까지 배열생성;
	for(i=2;i&lt;=100;i++)
	{
		if(arr[i]==1)
			continue;
		j=i+i;
		while(j&lt;=100)
		{
			arr[j]=1;
			j+=i;//i의 배수로 증가
		}
	}

	for(i=2;i&lt;=100;i++)
		if(arr[i]==0)
			printf(&quot;%d &quot;,i);
}&lt;/textarea&gt;&lt;br /&gt;
&lt;img src=&quot;http://cfs8.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczgudGlzdG9yeS5jb206L2F0dGFjaC8wLzExLmdpZg%3D%3D&quot; width=&quot;161&quot; height=&quot;241&quot; /&gt;&lt;br /&gt;
다음부턴 열심히 쓸게요. 때리지 마요 제발&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-news-widget&quot; style=&quot;width: 100%; text-align: center&quot;&gt;
		  					&lt;embed src=&quot;http://api.v.daum.net/static/recombox1.swf&quot; quality=&quot;high&quot; flashvars=&quot;nid=1577772&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;false&quot; bgcolor=&quot;#ffffff&quot; width=&quot;400&quot; height=&quot;80&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot;&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/397&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>algorithm</category>
			<category>c</category>
			<category>C 게임</category>
			<category>C언어</category>
			<category>소수</category>
			<category>알고리즘</category>
			<author>　환타</author>
			<guid>http://zfanta.com/397</guid>
			<comments>http://zfanta.com/entry/C-%EC%86%8C%EC%88%98%ED%8C%90%EB%8B%A8-%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98#entry397comment</comments>
			<pubDate>Sat, 02 Aug 2008 14:53:11 +0900</pubDate>
		</item>
		<item>
			<title>예쁜 ubuntu의 3D 데스크탑</title>
			<link>http://zfanta.com/entry/%EC%98%88%EC%81%9C-ubuntu%EC%9D%98-3D-%EB%8D%B0%EC%8A%A4%ED%81%AC%ED%83%91</link>
			<description>&lt;DIV align=center&gt;
&lt;DIV style=&quot;TEXT-ALIGN: left&quot; align=center&gt;우분투에 compiz와 kiba-dock, emerald를 적용한 제 컴을 녹화했습니다.&lt;/DIV&gt;&lt;/DIV&gt;
&lt;P&gt;식상하시겠지만 봐주세요 ㅋㅋ&lt;br /&gt;&lt;/P&gt;
&lt;P&gt;
&lt;DIV class=wlWriterSmartContent id=scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:84234e15-751b-4906-8d3d-87bc32fe7f77 style=&quot;PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px&quot;&gt;
&lt;DIV id=5cd7a9a8-3a76-4bfa-909e-7cb404b09629 style=&quot;PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px&quot;&gt;
&lt;/DIV&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;object width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/HqqvpXA1kUc&amp;amp;hl=ko&quot;&gt;&lt;/param&gt;&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/HqqvpXA1kUc&amp;amp;hl=ko&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot; width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;아직 삽질이 덜되어서 보여드릴 게 별로 없네요. 컴퓨터 사양때문에 못보여드린 게 더 많아요. 이것보다 더 화려한 장면 많은데 말이죠 ㅋㅋㅋㅋ.&lt;/P&gt;
&lt;P&gt;이 동영상은 엄청나네요 ㄷㄷㄷㄷ&lt;br /&gt;&lt;object width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/_ImW0-MgR8I&amp;amp;hl=ko&quot;&gt;&lt;/param&gt;&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/_ImW0-MgR8I&amp;amp;hl=ko&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot; width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;/P&gt;
&lt;P&gt;
&lt;DIV class=wlWriterSmartContent id=scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:dd69ffcf-ea05-4bfc-8088-39f421029c4a style=&quot;PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px&quot;&gt;
&lt;DIV id=04f7c451-b17b-41ab-bd7d-a515ba4359fa style=&quot;PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px&quot;&gt;
&lt;/DIV&gt;&lt;/DIV&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;P&gt;&lt;A href=&quot;http://zfanta.com/owner/entry/edit/http://cfs9.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczkudGlzdG9yeS5jb206L2F0dGFjaC8wLzYuZ2lm&quot;&gt;&lt;img src=&quot;http://cfs9.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczkudGlzdG9yeS5jb206L2F0dGFjaC8wLzcuZ2lm&quot; height=&quot;181&quot; /&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;우분투 멋져&lt;/P&gt;&lt;br /&gt;
&lt;P&gt;ps.아니 왜 힘들게 스킨에 Link메뉴 추가했는데 아무도 아는 척을 해주지 않는거야.&lt;/P&gt;
&lt;P&gt;&lt;A href=&quot;http://zfanta.com/owner/entry/edit/http://cfs7.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczcudGlzdG9yeS5jb206L2F0dGFjaC8wLzcuanBn&quot;&gt;&lt;img src=&quot;http://cfs8.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczgudGlzdG9yeS5jb206L2F0dGFjaC8wLzQuanBn&quot; height=&quot;484&quot; /&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;이런 내가 우스운건가 ㅋㅋㅋㅋ&lt;/P&gt;&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/384&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>리눅스</category>
			<category>compiz</category>
			<category>ubuntu</category>
			<category>리눅스</category>
			<category>우분투</category>
			<author>　환타</author>
			<guid>http://zfanta.com/384</guid>
			<comments>http://zfanta.com/entry/%EC%98%88%EC%81%9C-ubuntu%EC%9D%98-3D-%EB%8D%B0%EC%8A%A4%ED%81%AC%ED%83%91#entry384comment</comments>
			<pubDate>Fri, 06 Jun 2008 15:36:59 +0900</pubDate>
		</item>
		<item>
			<title>정렬 알고리즘 - 거품정렬(bubble sort)</title>
			<link>http://zfanta.com/entry/%EC%A0%95%EB%A0%AC-%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98-%EA%B1%B0%ED%92%88%EC%A0%95%EB%A0%ACbubble-sort</link>
			<description>&lt;p&gt;버블정렬.&lt;br /&gt;
저음엔 이거만 있는 줄 알았는데.&lt;br /&gt;
지금은 GG상태.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;
&lt;table bordercolordark=&quot;white&quot; bordercolorlight=&quot;black&quot; border=&quot;1&quot; cellspacing=&quot;0&quot; width=&quot;400&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td bgcolor=&quot;yellow&quot; width=&quot;181&quot;&gt;Z&lt;/td&gt;
&lt;td bgcolor=&quot;yellow&quot; width=&quot;181&quot;&gt;F&lt;/td&gt;
&lt;td width=&quot;181&quot;&gt;A&lt;/td&gt;
&lt;td width=&quot;181&quot;&gt;N&lt;/td&gt;
&lt;td width=&quot;181&quot;&gt;T&lt;/td&gt;
&lt;td width=&quot;181&quot;&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width=&quot;181&quot;&gt;F&lt;/td&gt;
&lt;td bgcolor=&quot;yellow&quot; width=&quot;181&quot;&gt;Z&lt;/td&gt;
&lt;td bgcolor=&quot;yellow&quot; width=&quot;181&quot;&gt;A&lt;/td&gt;
&lt;td width=&quot;181&quot;&gt;N&lt;/td&gt;
&lt;td width=&quot;181&quot;&gt;T&lt;/td&gt;
&lt;td width=&quot;181&quot;&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width=&quot;181&quot;&gt;F&lt;/td&gt;
&lt;td width=&quot;181&quot;&gt;A&lt;/td&gt;
&lt;td bgcolor=&quot;yellow&quot; width=&quot;181&quot;&gt;Z&lt;/td&gt;
&lt;td bgcolor=&quot;yellow&quot; width=&quot;181&quot;&gt;N&lt;/td&gt;
&lt;td width=&quot;181&quot;&gt;T&lt;/td&gt;
&lt;td width=&quot;181&quot;&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width=&quot;181&quot;&gt;F&lt;/td&gt;
&lt;td width=&quot;181&quot;&gt;A&lt;/td&gt;
&lt;td width=&quot;181&quot;&gt;N&lt;/td&gt;
&lt;td bgcolor=&quot;yellow&quot; width=&quot;181&quot;&gt;Z&lt;/td&gt;
&lt;td bgcolor=&quot;yellow&quot; width=&quot;181&quot;&gt;T&lt;/td&gt;
&lt;td width=&quot;181&quot;&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width=&quot;181&quot;&gt;F&lt;/td&gt;
&lt;td width=&quot;181&quot;&gt;A&lt;/td&gt;
&lt;td width=&quot;181&quot;&gt;N&lt;/td&gt;
&lt;td width=&quot;181&quot;&gt;T&lt;/td&gt;
&lt;td bgcolor=&quot;yellow&quot; width=&quot;181&quot;&gt;Z&lt;/td&gt;
&lt;td bgcolor=&quot;yellow&quot; width=&quot;181&quot;&gt;A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width=&quot;181&quot;&gt;...&lt;/td&gt;
&lt;td width=&quot;181&quot;&gt;...&lt;/td&gt;
&lt;td width=&quot;181&quot;&gt;...&lt;/td&gt;
&lt;td width=&quot;181&quot;&gt;...&lt;/td&gt;
&lt;td width=&quot;181&quot;&gt;...&lt;/td&gt;
&lt;td width=&quot;181&quot;&gt;...&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
이런 식으로 비고하면서 정렬된다.&lt;br /&gt;
몇 번 더해야되.&lt;br /&gt;

&lt;textarea name=&quot;code&quot; class=&quot;c&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 677px; margin-top: 1px; margin-bottom: 1px; height: 836px; &quot;&gt;
#include &lt;stdlib.h&gt;  
#include &lt;stdio.h&gt;    
#include &lt;time.h&gt;    
#include &lt;conio.h&gt;  

int main()    
{    
	int a[100];    
	int start,end;    
	int max,min;    
	int count,count2;    
	int temp;  

	srand((unsigned)time(NULL));    

	printf(&quot;시작 : &quot;);    
	scanf(&quot;%d&quot;,&amp;start);    
	printf(&quot;종료 : &quot;);    
	scanf(&quot;%d&quot;,&amp;end);    

	min=end;    
	max=start;    

	printf(&quot;정렬 전\n&quot;);  
	for(count=0;count&lt;20;count++)    
	{    
		a[count]=rand() % (end - start + 1) + start;                
		printf(&quot;%3d&quot;,a[count]);    
	}  

	/*여기부터*/ 
	for (count = 20-1; count &gt; 0 ; count--)
	{ 
		for (count2 = 1; count2 &lt;= count ; count2++)
		{
			if (a[count2-1] &gt; a[count2])
			{
				temp = a[count2-1];
				a[count2-1] = a[count2];
				a[count2] = temp;       
			}
		}
	}
	/*여기까지 거품정렬입니다.*/ 

	printf(&quot;\n정렬 후\n&quot;);  
	for(count=0;count&lt;20;count++)    
	{    
		printf(&quot;%3d&quot;,a[count]);    
	}  

	getch();  
	return 0;    
}
&lt;/textarea&gt;&lt;br /&gt;
&lt;br /&gt;
참고 : &lt;a href=&quot;http://zfanta.com/entry/%EC%A0%95%EB%A0%AC-%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98-%EC%84%A0%ED%83%9D%EC%A0%95%EB%A0%AC-Selection-Sort&quot; target=&quot;_blank&quot;&gt;선택정렬&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://cfs7.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczcudGlzdG9yeS5jb206L2F0dGFjaC8wLzAuanBn&quot; width=&quot;520&quot; height=&quot;348&quot; /&gt;&lt;br /&gt;
이거 좀 날로 먹는듯 ㅋㅋㅋ&lt;br /&gt;&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/377&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>algorithm</category>
			<category>c</category>
			<category>거품정렬</category>
			<category>버블정렬</category>
			<category>심심해</category>
			<category>알고리즘</category>
			<category>정렬</category>
			<category>프로그래밍</category>
			<author>　환타</author>
			<guid>http://zfanta.com/377</guid>
			<comments>http://zfanta.com/entry/%EC%A0%95%EB%A0%AC-%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98-%EA%B1%B0%ED%92%88%EC%A0%95%EB%A0%ACbubble-sort#entry377comment</comments>
			<pubDate>Fri, 16 May 2008 17:16:27 +0900</pubDate>
		</item>
		<item>
			<title>C언어 변환문자</title>
			<link>http://zfanta.com/entry/C%EC%96%B8%EC%96%B4-%EB%B3%80%ED%99%98%EB%AC%B8%EC%9E%90-%EC%82%AC%EC%9A%A9%EB%B2%95</link>
			<description>바로 예제부터 ㄱㄱ&lt;br /&gt;
&lt;br /&gt;
우리는 C언어를 처음 배울 때 이 소스부터 배우게됩니다.&lt;br /&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-top: 1px; margin-bottom: 1px; height: 108px; margin-left: 0px; margin-right: 0px; width: 301px; &quot;&gt;
#include &lt;stdio.h&gt;

void main()
{
	printf(&quot;Hello world&quot;);
}
&lt;/textarea&gt;&lt;br /&gt;
위 소스는 누구나 쉽게 이해알 수 있죠. 문제는 아래소스&lt;br /&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-top: 1px; margin-bottom: 1px; height: 136px; margin-left: 0px; margin-right: 0px; width: 304px; &quot;&gt;
#include &lt;stdio.h&gt;

void main()
{
	int a=5;
	printf(&quot;%d&quot;,a);

}
&lt;/textarea&gt;&lt;br /&gt;
중간에 나오는 %d라는 놈 덕에 꽤 당황하죠.&lt;br /&gt;
&lt;br /&gt;
%d는 변환문자라고 합니다. 순서에 대응하는 변수를 만지작(?) 합니다.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;1.변환문자의 종류에는 &lt;/strong&gt;&lt;br /&gt;
&lt;table bordercolordark=&quot;white&quot; bordercolorlight=&quot;black&quot; border=&quot;1&quot; cellspacing=&quot;0&quot; width=&quot;600&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width=&quot;145&quot;&gt;
&lt;p&gt;%d,%i &lt;/p&gt;
&lt;/td&gt;
&lt;td width=&quot;445&quot;&gt;
&lt;p&gt;부호 있는 10진 정수형 출력.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width=&quot;145&quot;&gt;
&lt;p&gt;%u&lt;/p&gt;
&lt;/td&gt;
&lt;td width=&quot;445&quot;&gt;
&lt;p&gt;부호 없는 10진 정수형 출력.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width=&quot;145&quot;&gt;
&lt;p&gt;%o &lt;/p&gt;
&lt;/td&gt;
&lt;td width=&quot;445&quot;&gt;
&lt;p&gt;부호 없는 8진 정수형 출력.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td height=&quot;20&quot; width=&quot;145&quot;&gt;
&lt;p&gt;%x, %X &lt;/p&gt;
&lt;/td&gt;
&lt;td height=&quot;20&quot; width=&quot;445&quot;&gt;
&lt;p&gt;부호 없는 16진 정수형 출력, x는 소문자, X는 대문자로 출력된다.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td height=&quot;20&quot; width=&quot;145&quot;&gt;
&lt;p&gt;%c &lt;/p&gt;
&lt;/td&gt;
&lt;td height=&quot;20&quot; width=&quot;445&quot;&gt;
&lt;p&gt;한 개의 문자 출력. 문자의 아스키 코드가 인수로 사용된다.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td height=&quot;39&quot; width=&quot;145&quot;&gt;
&lt;p&gt;%f  &lt;/p&gt;
&lt;/td&gt;
&lt;td height=&quot;39&quot; width=&quot;445&quot;&gt;
&lt;p&gt;소숫점 표기. float형이나 double형을 출력한다.&lt;br /&gt;
정밀도가 나오지 않으면 소숫점 6자리까지 출력된다.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width=&quot;145&quot;&gt;
&lt;p&gt;%s  &lt;/p&gt;
&lt;/td&gt;
&lt;td width=&quot;445&quot;&gt;
&lt;p&gt;마지막 NULL을 제외한 문자열을 출력&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width=&quot;145&quot;&gt;
&lt;p&gt;%%&lt;/p&gt;
&lt;/td&gt;
&lt;td width=&quot;445&quot;&gt;
&lt;p&gt;문자 '%'출력&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
제가 써본거라곤 d,c,f,s밖에 없네요.ㅋㅋ&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;2.printf에서&lt;br /&gt;
&lt;/strong&gt;printf에서 변환문자로 재밌게 놀 수 있습니다.&lt;br /&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-top: 1px; margin-bottom: 1px; height: 126px; margin-left: 0px; margin-right: 0px; width: 328px; &quot;&gt;
#include &lt;stdio.h&gt;

void main()
{
	int a=5;
	printf(&quot;%4d&quot;,a);
}
&lt;/textarea&gt;&lt;br /&gt;
달라진 건 printf의 %d사이에 숫자 4가 있다는 거.&lt;span style=&quot;font-weight: bold;&quot;&gt; (&quot;필드 폭 지정자&quot;라고 합니다.)&lt;/span&gt;&lt;br /&gt;
이건 폭을 지정합니다. (기본은 오른쪽정렬)&lt;br /&gt;
가운데의 숫자 바꿔가면서 하면 금방 아실거에요.&lt;br /&gt;
왼쪽으로 정렬하고 싶다면.&lt;br /&gt;
&lt;textarea name=&quot;code&quot; class=&quot;c&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 285px; margin-top: 1px; margin-bottom: 1px; height: 121px; &quot;&gt;
#include &lt;stdio.h&gt;

void main()
{
    int a=5;
    printf(&quot;%-4d&quot;,a);
}
&lt;/textarea&gt;&lt;br /&gt;
달라진 건 %4d가 %-4d로 바뀐 거 밖에 없어요. &lt;span style=&quot;font-weight: bold;&quot;&gt;(이 &quot;-&quot;는 &quot;플래그&quot;라고 합니다.)&lt;br /&gt;
&lt;/span&gt;플래그의 종류에는&lt;br /&gt;
&lt;table bordercolordark=&quot;white&quot; bordercolorlight=&quot;black&quot; border=&quot;1&quot; cellspacing=&quot;0&quot; width=&quot;600&quot;&gt;
    &lt;tbody&gt;&lt;tr&gt;
        &lt;td width=&quot;72&quot;&gt;-&lt;/td&gt;
        &lt;td width=&quot;518&quot;&gt;
            &lt;p&gt;출력되는 내용을  왼쪽으로 정렬&lt;br /&gt;
적지 않으면 기본으로 오른쪽 정렬&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width=&quot;72&quot;&gt;+&lt;/td&gt;
        &lt;td width=&quot;518&quot;&gt;            &lt;p&gt;수를 출력할 때 항상 +나 -를 앞에 출력&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width=&quot;72&quot;&gt;  (공백)&lt;/td&gt;
        &lt;td width=&quot;518&quot;&gt;            &lt;p&gt;수를 출력할 때 앞을 빈칸으로&lt;/p&gt;
&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td width=&quot;72&quot;&gt;#&lt;/td&gt;
        &lt;td width=&quot;518&quot;&gt;%o, %x, %X에서만 쓰임, 8진수는 0, 16진수는 0x를 앞에 출력&lt;/td&gt;
    &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
참 쉽죠?&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;2. scanf에서&lt;br /&gt;
&lt;/span&gt;scanf에서도 재밌게 놀 수 있어요.&lt;br /&gt;
작년에 이걸 알았다면 대회에서 GG는 없었을 텐데요. ㅜㅜ&lt;br /&gt;
&lt;br /&gt;
2개 이상의 수 입력받기.&lt;br /&gt;
&lt;textarea name=&quot;code&quot; class=&quot;c&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 324px; margin-top: 1px; margin-bottom: 1px; height: 186px; &quot;&gt;
#include &lt;stdio.h&gt;

main()
{
	int a,b;
	printf(&quot;숫자 2개 : &quot;);
	scanf(&quot;%d%d&quot;,&amp;a,&amp;b);

	printf(&quot;\n%d하고 %d\n&quot;,a,b);
}
&lt;/textarea&gt;&lt;br /&gt;
대부분 이헐게 합니다. 공백을 기준으로 숫자를 입력받죠. &lt;br /&gt;
,(쉼표)로 숫자를 구분하고 싶을 때는 간단하게 &lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;scanf(&quot;%d%d&quot;,&amp;amp;a,&amp;amp;b);&lt;/span&gt;를 &lt;span style=&quot;font-weight: bold;&quot;&gt;scanf(&quot;%d,%d&quot;,&amp;amp;a,&amp;amp;b);&lt;/span&gt;로 바꿔주면 끝.&lt;br /&gt;
&lt;br /&gt;
%d와 %d사이에 ,를 넣었습니다.&lt;br /&gt;
scanf는 여기서 끝내겠습니다. &lt;br /&gt;
&lt;br /&gt;
&lt;p id=&quot;more369_0&quot; class=&quot;moreless_fold&quot;&gt;&lt;span style=&quot;cursor: pointer;&quot; onclick=&quot;toggleMoreLess(this, '369_0','이건 헛소리....','less..'); return false;&quot;&gt;이건 헛소리....&lt;/span&gt;&lt;/p&gt;&lt;div id=&quot;content369_0&quot; class=&quot;moreless_content&quot; style=&quot;display: none;&quot;&gt;저처럼 저 방법 모르고 gets함수 써서 문자열 입력받고 -48하던 분은 없겠죠?&lt;br /&gt;
호랑이 담배피던 시절 나는......&lt;br /&gt;
&lt;br /&gt;
3초안에 웃겨드리는 소스 ㅋㅋ(모르던 시절에 쓰던...)&lt;br /&gt;
&lt;textarea name=&quot;code&quot; class=&quot;c&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 485px; margin-top: 1px; margin-bottom: 1px; height: 297px; &quot;&gt;#include &lt;stdio.h&gt;

main()
{
	char a[4];
	int b,c;
	int count;
	printf(&quot;숫자 2개 : &quot;);
	gets(&amp;a);

	for(count=0;a[count]!='\0';count++)
	{
		if(a[count]&gt;=48 &amp;&amp; a[count]&lt;=57)
			a[count]-=48;
	}

	printf(&quot;\n%d 하고 %d&quot;,a[0],a[2]);
}&lt;/textarea&gt;&lt;br /&gt;
즐거우셨나요?&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-news-widget&quot; style=&quot;width: 100%; text-align: center&quot;&gt;
		  					&lt;embed src=&quot;http://api.v.daum.net/static/recombox1.swf&quot; quality=&quot;high&quot; flashvars=&quot;nid=957879&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;false&quot; bgcolor=&quot;#ffffff&quot; width=&quot;400&quot; height=&quot;80&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot;&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/369&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>C/C++</category>
			<category>c</category>
			<category>C언어</category>
			<category>변환문자</category>
			<category>프로그래밍</category>
			<author>　환타</author>
			<guid>http://zfanta.com/369</guid>
			<comments>http://zfanta.com/entry/C%EC%96%B8%EC%96%B4-%EB%B3%80%ED%99%98%EB%AC%B8%EC%9E%90-%EC%82%AC%EC%9A%A9%EB%B2%95#entry369comment</comments>
			<pubDate>Wed, 26 Mar 2008 18:20:57 +0900</pubDate>
		</item>
		<item>
			<title>C언어로 게임만들기 [미로편] # 2</title>
			<link>http://zfanta.com/entry/C%EC%96%B8%EC%96%B4%EB%A1%9C-%EA%B2%8C%EC%9E%84%EB%A7%8C%EB%93%A4%EA%B8%B0%EB%AF%B8%EB%A1%9C%ED%8E%B8-2</link>
			<description>&lt;p&gt;오늘은 2번째.&lt;br /&gt;
내일 3번째 글 올리면 끝날 것 같다.&lt;br /&gt;
아 진짜 블로그에 쓸 글이 없어&lt;br /&gt;
&lt;br /&gt;
새로 추가된 move함수입니다. 방향키를 입력받아서 돌을 움직입니다.&lt;br /&gt;
&lt;/p&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 516px; margin-top: 1px; margin-bottom: 1px; height: 955px; &quot;&gt;
void move()
{
	int input;
	input=getch();

	switch(input)
	{
	case RIGHT :
		if(x&lt;40)
		{              
			if(map1[y][(x/2)+1] == 0)
			{
				gotoxy(x,y);
				printf(&quot; &quot;);
				x+=2;
				gotoxy(x,y);
				printf(&quot;●&quot;);
			}
		}
		break;

	case LEFT :
		if(x&gt;1)
		{              
			if(map1[y][(x/2)-1] == 0)
			{
				gotoxy(x,y);
				printf(&quot; &quot;);
				x-=2;
				gotoxy(x,y);
				printf(&quot;●&quot;);
			}
		}
		break;
	case UP :
		if(y&gt;1)
		{              
			if(map1[y-1][x/2] == 0)
			{
				gotoxy(x,y);
				printf(&quot; &quot;);
				y-=1;
				gotoxy(x,y);
				printf(&quot;●&quot;);
			}
		}
		break;

	case DOWN :
		if(y&lt;20)
		{              
			if(map1[y+1][x/2] == 0)
			{
				gotoxy(x,y);
				printf(&quot; &quot;);
				y+=1;
				gotoxy(x,y);
				printf(&quot;●&quot;);
			}
		}
		break;
	}
}&lt;/textarea&gt;&lt;br /&gt;
가는 곳에 벽이 없다면 지금 위치에 있는 걸 지우고 새로운 돌을 그립니다.&lt;br /&gt;
&lt;br /&gt;
move함수 호출은 이렇게 무한루프 ㅇ_ㅇ&lt;br /&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-top: 1px; margin-bottom: 1px; height: 64px; margin-left: 0px; margin-right: 0px; width: 180px; &quot;&gt;while(1)
{
	move();
}&lt;/textarea&gt;&lt;br /&gt;
&lt;br /&gt;
최종 소스&lt;br /&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 647px; margin-top: 1px; margin-bottom: 1px; height: 1995px; &quot;&gt;#include &lt;stdio.h&gt;
#include &lt;windows.h&gt;
#include &lt;conio.h&gt;

#define UP 72
#define DOWN 80
#define LEFT 75
#define RIGHT 77

int x,y;

int map1[20][20]=
{
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } 
};

void gotoxy(int x, int y) 
{
    COORD XY = {x, y};
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), XY);
}

void move()
{
    int input;
    input=getch();

    switch(input)
    {
    case RIGHT :
        if(x&lt;40)
        {
            if(map1[y][(x/2)+1] == 0)
            {
                gotoxy(x,y);
                printf(&quot; &quot;);
                x+=2;
                gotoxy(x,y);
                printf(&quot;●&quot;);
            }
        }
        break;

    case LEFT :
        if(x&gt;1)
        {
            if(map1[y][(x/2)-1] == 0)
            {
                gotoxy(x,y);
                printf(&quot; &quot;);
                x-=2;
                gotoxy(x,y);
                printf(&quot;●&quot;);
            }
        }
        break;
    
	case UP :
        if(y&gt;1)
        {
            if(map1[y-1][x/2] == 0)
            {
                gotoxy(x,y);
                printf(&quot; &quot;);
                y-=1;
                gotoxy(x,y);
                printf(&quot;●&quot;);
            }
        }
        break;

    case DOWN :
        if(y&lt;20)
        {
            if(map1[y+1][x/2] == 0)
            {
                gotoxy(x,y);
                printf(&quot; &quot;);
                y+=1;
                gotoxy(x,y);
                printf(&quot;●&quot;);
            }
        }
        break;
    }
}


void main()
{
    int count,count2;
    for(count=0;count&lt;20;count++)
    {
        for(count2=0;count2&lt;20;count2++)
        {
            if(map1[count][count2]==1)
                printf(&quot;○&quot;);
            else
                printf(&quot;  &quot;);
        }
        printf(&quot;\n&quot;);
    }

    x=0;
    y=1;

    gotoxy(x,y);
    printf(&quot;●&quot;);
    while(1)
    {
        move();
    }
}&lt;/textarea&gt;&lt;br /&gt;
&lt;br /&gt;
추가된 게 move함수밖에 없네요. (목숨만은 살려주세요)&lt;br /&gt;
이해안가는 부분은 리플 ㄱㄱ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Ps. 그거보다 내일 월요일 ㅜㅜㅜㅜ&lt;br /&gt;
&lt;/strong&gt;&lt;img src=&quot;http://cfs4.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczQudGlzdG9yeS5jb206L2F0dGFjaC8wLzIwMDAwMDAwMDAwMC5qcGc%3D&quot; width=&quot;383&quot; height=&quot;217&quot; /&gt;&lt;br /&gt;
&lt;strong&gt;학교가자&lt;/strong&gt;&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-news-widget&quot; style=&quot;width: 100%; text-align: center&quot;&gt;
		  					&lt;embed src=&quot;http://api.v.daum.net/static/recombox1.swf&quot; quality=&quot;high&quot; flashvars=&quot;nid=939446&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;false&quot; bgcolor=&quot;#ffffff&quot; width=&quot;400&quot; height=&quot;80&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot;&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/368&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>C/C++</category>
			<category>c</category>
			<category>C언어</category>
			<category>게임</category>
			<category>미로</category>
			<category>월요일</category>
			<category>프로그래밍</category>
			<author>　환타</author>
			<guid>http://zfanta.com/368</guid>
			<comments>http://zfanta.com/entry/C%EC%96%B8%EC%96%B4%EB%A1%9C-%EA%B2%8C%EC%9E%84%EB%A7%8C%EB%93%A4%EA%B8%B0%EB%AF%B8%EB%A1%9C%ED%8E%B8-2#entry368comment</comments>
			<pubDate>Sun, 23 Mar 2008 16:02:17 +0900</pubDate>
		</item>
		<item>
			<title>C언어로 게임만들기 [미로편]</title>
			<link>http://zfanta.com/entry/C%EC%96%B8%EC%96%B4%EB%A1%9C-%EA%B2%8C%EC%9E%84%EB%A7%8C%EB%93%A4%EA%B8%B0-%EC%98%A4%EB%AA%A9%ED%8E%B8</link>
			<description>저번에 지저분한 소스로 간신히 오목 만들고 나서 이번엔 미로찾기입니다..&lt;br /&gt;
이번 게임이 더쉬운데 귀찮아요. ㅡㅡ 개학하니까 죽을 것 같아요.&lt;br /&gt;
살려주세요.&lt;br /&gt;
&lt;br /&gt;
예전 글은 &lt;a href=&quot;http://zfanta.com/333&quot;&gt;C언어로 오목만들기 5 마지막.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
예전처럼 #define로 방향키 설정해주고&lt;br /&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 232px; margin-top: 1px; margin-bottom: 1px; height: 65px; &quot;&gt;
#define UP 72
#define DOWN 80
#define LEFT 75
#define RIGHT 77&lt;/textarea&gt;&lt;br /&gt;
&lt;br /&gt;
커서를 이동해주는 함수 gotoxy도 정의해주고&lt;br /&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-top: 1px; margin-bottom: 1px; height: 86px; margin-left: 0px; margin-right: 0px; width: 508px; &quot;&gt;void gotoxy(int x, int y) 
{
    COORD XY = {x, y};
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), XY);
}&lt;/textarea&gt;&lt;br /&gt;
이 함수를 쓰시려면 #include &amp;lt;windows.h&gt; 를 꼭.&lt;br /&gt;
&lt;br /&gt;
그리고 미로도 만들어줍니다. 1은 벽,0은 빈 공간입니다.&lt;br /&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 498px; margin-top: 1px; margin-bottom: 1px; height: 359px; &quot;&gt;int map1[20][20]=
{
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
    { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } 
};&lt;/textarea&gt;&lt;br /&gt;
가로 20, 세로 20의 미로입니다.&lt;br /&gt;
참.................................&lt;br /&gt;
&lt;br /&gt;
이건 화면에 미로를 그려주는 main함수&lt;br /&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 433px; margin-top: 1px; margin-bottom: 1px; height: 259px; &quot;&gt;main()
{
	int count,count2;
	for(count=0;count&lt;20;count++)
	{
		for(count2=0;count2&lt;20;count2++)
		{
			if(map1[count][count2]==1)
				printf(&quot;○&quot;);
			else
				printf(&quot;  &quot;);
		}
		printf(&quot;\n&quot;);
	}
	system(&quot;PAUSE&quot;);
}&lt;/textarea&gt;&lt;br /&gt;
&lt;br /&gt;
이만 미로 그리는 부분에서 끝내렵니다.&lt;br /&gt;
&lt;img src=&quot;http://cfs5.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczUudGlzdG9yeS5jb206L2F0dGFjaC8wLzE4MDAwMDAwMDAwMy5qcGc%3D&quot; width=&quot;669&quot; height=&quot;436&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
개학이 사람잡네요.&lt;br /&gt;
&lt;img src=&quot;http://cfs6.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczYudGlzdG9yeS5jb206L2F0dGFjaC8wLzIwMDAwMDAwMDAwMC5qcGc%3D&quot; width=&quot;550&quot; height=&quot;369&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-news-widget&quot; style=&quot;width: 100%; text-align: center&quot;&gt;
		  					&lt;embed src=&quot;http://api.v.daum.net/static/recombox1.swf&quot; quality=&quot;high&quot; flashvars=&quot;nid=933461&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;false&quot; bgcolor=&quot;#ffffff&quot; width=&quot;400&quot; height=&quot;80&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot;&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/367&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>C/C++</category>
			<category>c</category>
			<category>C언어</category>
			<category>게임</category>
			<category>프로그래밍</category>
			<author>　환타</author>
			<guid>http://zfanta.com/367</guid>
			<comments>http://zfanta.com/entry/C%EC%96%B8%EC%96%B4%EB%A1%9C-%EA%B2%8C%EC%9E%84%EB%A7%8C%EB%93%A4%EA%B8%B0-%EC%98%A4%EB%AA%A9%ED%8E%B8#entry367comment</comments>
			<pubDate>Sat, 22 Mar 2008 00:27:35 +0900</pubDate>
		</item>
		<item>
			<title>정렬 알고리즘 - 선택정렬 (Selection Sort)</title>
			<link>http://zfanta.com/entry/%EC%A0%95%EB%A0%AC-%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98-%EC%84%A0%ED%83%9D%EC%A0%95%EB%A0%AC-Selection-Sort</link>
			<description>오늘은 정렬중 쉽고 쉬운 선택정렬입니다.&lt;br /&gt;
&lt;p&gt;아래 표는 정렬 과정.&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;
&lt;table bordercolordark=&quot;white&quot; bordercolorlight=&quot;black&quot; border=&quot;1&quot; cellspacing=&quot;0&quot; width=&quot;446&quot;&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td bgcolor=&quot;white&quot; height=&quot;35&quot; width=&quot;70&quot;&gt;&lt;br /&gt;
&lt;/td&gt;
&lt;td bgcolor=&quot;white&quot; height=&quot;35&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;a[0]&lt;/p&gt;
&lt;/td&gt;
&lt;td height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;a[1]&lt;/p&gt;
&lt;/td&gt;
&lt;td height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;a[2]&lt;/p&gt;
&lt;/td&gt;
&lt;td height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;a[3]&lt;/p&gt;
&lt;/td&gt;
&lt;td height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;a[4]&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor=&quot;white&quot; height=&quot;35&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;1.&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor=&quot;white&quot; height=&quot;35&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;9&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;12&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;61&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;5&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;1&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor=&quot;white&quot; height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;2.&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor=&quot;#cccccc&quot; height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;1&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor=&quot;white&quot; height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;12&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;61&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;5&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;9&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor=&quot;white&quot; height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;3.&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor=&quot;#cccccc&quot; height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;1&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor=&quot;#cccccc&quot; height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;5&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor=&quot;white&quot; height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;61&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;12&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;9&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor=&quot;white&quot; height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;4.&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor=&quot;#cccccc&quot; height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;1&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor=&quot;#cccccc&quot; height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;5&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor=&quot;#cccccc&quot; height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;9&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor=&quot;white&quot; height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;12&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;61&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td bgcolor=&quot;white&quot; height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;5.&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor=&quot;#cccccc&quot; height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;1&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor=&quot;#cccccc&quot; height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;5&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor=&quot;#cccccc&quot; height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;9&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor=&quot;#cccccc&quot; height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;12&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td bgcolor=&quot;white&quot; height=&quot;70&quot; width=&quot;70&quot;&gt;
&lt;p align=&quot;center&quot;&gt;&lt;b&gt;61&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
1. 배열중 가장 작은 값을 찾아 첫 번째 값과 위치를 바꿉니다.&lt;br /&gt;
&lt;br /&gt;
2. 첫번째 값을 빼고 가장 작은 값을 찾아 두번째 값과 위치를 바꿉니다.&lt;br /&gt;
&lt;br /&gt;
3. 첫번째,두번째 값을 제외하고 가장 작은 값을 찾아 세번째 값과 위치를 바꿉니다.&lt;br /&gt;
&lt;br /&gt;
4. 다 될 때까지 반복 ㅡ,.ㅡ;;;&lt;br /&gt;
&lt;br /&gt;
어때요&lt;br /&gt;
&lt;img src=&quot;http://cfs4.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczQudGlzdG9yeS5jb206L2F0dGFjaC8wLzE1MDAwMDAwMDAwMi5naWY%3D&quot; width=&quot;290&quot; height=&quot;391&quot; /&gt;&lt;br /&gt;
가장 쉬운 선택정렬입니다.&lt;br /&gt;
&lt;br /&gt;
아래는 C언어로 만든 소스입니다.&lt;br /&gt;
예전 글 &lt;a href=&quot;http://zfanta.com/335&quot;&gt;난수 발생함수 rand(), 난수 범위 지정하기&lt;/a&gt;의 소스도 썼습니다.&lt;br /&gt;
&lt;br /&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 594px; margin-top: 1px; margin-bottom: 1px; height: 830px; &quot;&gt;
#include &lt;stdlib.h&gt;
#include &lt;stdio.h&gt;  
#include &lt;time.h&gt;  
#include &lt;conio.h&gt;

int main()  
{  
	int a[100];  
	int start,end;  
	int max,min;  
	int count,count2;  
	int temp;

	srand((unsigned)time(NULL));  

	printf(&quot;시작 : &quot;);  
	scanf(&quot;%d&quot;,&amp;start);  
	printf(&quot;종료 : &quot;);  
	scanf(&quot;%d&quot;,&amp;end);  

	min=end;  
	max=start;  

	printf(&quot;정렬 전\n&quot;);
	for(count=0;count&lt;20;count++)  
	{  
		a[count]=rand() % (end - start + 1) + start;              
		printf(&quot;%3d&quot;,a[count]);  
	}

	/*여기부터*/
	for(count=0; count&lt;20-1; count++) 
	{ 
		min = count; 
		for(count2=count+1; count2&lt;20; count2++) 
			if(a[count2] &lt; a[min]) 
				min = count2;                  
		if(count != min) 
		{                    
			temp = a[min]; 
			a[min] = a[count]; 
			a[count] = temp; 
		} 
	} 
	/*여기까지 선택정렬입니다.*/

	printf(&quot;\n정렬 후\n&quot;);
	for(count=0;count&lt;20;count++)  
	{  
		printf(&quot;%3d&quot;,a[count]);  
	}

	getch();
	return 0;  
}&lt;/textarea&gt;&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-news-widget&quot; style=&quot;width: 100%; text-align: center&quot;&gt;
		  					&lt;embed src=&quot;http://api.v.daum.net/static/recombox1.swf&quot; quality=&quot;high&quot; flashvars=&quot;nid=871172&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;false&quot; bgcolor=&quot;#ffffff&quot; width=&quot;400&quot; height=&quot;80&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot;&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/359&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>algorithm</category>
			<category>Algorithm</category>
			<category>c</category>
			<category>C++</category>
			<category>Selection Sort</category>
			<category>선택정렬</category>
			<category>알고리즘</category>
			<author>　환타</author>
			<guid>http://zfanta.com/359</guid>
			<comments>http://zfanta.com/entry/%EC%A0%95%EB%A0%AC-%EC%95%8C%EA%B3%A0%EB%A6%AC%EC%A6%98-%EC%84%A0%ED%83%9D%EC%A0%95%EB%A0%AC-Selection-Sort#entry359comment</comments>
			<pubDate>Fri, 07 Mar 2008 18:12:18 +0900</pubDate>
		</item>
		<item>
			<title>for문 10000번 VS 노가다 타이핑 10000번</title>
			<link>http://zfanta.com/entry/for%EB%AC%B8-10000%EB%B2%88-VS-%EB%85%B8%EA%B0%80%EB%8B%A4-%ED%83%80%EC%9D%B4%ED%95%91-10000%EB%B2%88</link>
			<description>오늘은 for(count=0; count &amp;lt;10000; count++) VS 노가다 타이핑 10000번입니다.&lt;br /&gt;
&lt;br /&gt;
뭔 소린지 모르겠다 하시는 분은 아래 소스를 봐주세요.&lt;br /&gt;
&lt;br /&gt;
&lt;p id=&quot;more347_0&quot; class=&quot;moreless_fold&quot;&gt;&lt;span style=&quot;cursor: pointer;&quot; onclick=&quot;toggleMoreLess(this, '347_0','for(count=0;count&amp;amp;lt;10000;count++)','for(count=0;count&amp;amp;lt;10000;count++)'); return false;&quot;&gt;for(count=0;count&amp;lt;10000;count++)&lt;/span&gt;&lt;/p&gt;&lt;div id=&quot;content347_0&quot; class=&quot;moreless_content&quot; style=&quot;display: none;&quot;&gt;&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 485px; margin-top: 1px; margin-bottom: 1px; height: 167px; &quot;&gt;#include &lt;stdio.h&gt;

main()
{
	int count;

	for(count=0;count&lt;10000;count++)
	{
		printf(&quot;zfanta.com\n&quot;);
	}
}&lt;/textarea&gt;&lt;/div&gt;&lt;br /&gt;
&lt;p id=&quot;more347_1&quot; class=&quot;moreless_fold&quot;&gt;&lt;span style=&quot;cursor: pointer;&quot; onclick=&quot;toggleMoreLess(this, '347_1','그냥 10000번 (파일첨부로 수정)','그냥 10000번'); return false;&quot;&gt;그냥 10000번 (파일첨부로 수정)&lt;/span&gt;&lt;/p&gt;&lt;div id=&quot;content347_1&quot; class=&quot;moreless_content&quot; style=&quot;display: none;&quot;&gt;&lt;div class=&quot;imageblock left&quot; style=&quot;float: left; margin-right: 10px;&quot;&gt;&lt;a href=&quot;http://zfanta.tistory.com/attachment/gl130000000140.c&quot;&gt;&lt;img src=&quot;http://i1.daumcdn.net/cfs.tistory/v/110706133414/blog/image/extension/unknown.gif&quot; alt=&quot;&quot; style=&quot;vertical-align: middle;&quot; /&gt; main.c&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
파일정보 스샷&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://cfs6.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczYudGlzdG9yeS5jb206L2F0dGFjaC8xLzEzMDAwMDAwMDEzOS5qcGc%3D&quot; width=&quot;425&quot; height=&quot;471&quot; /&gt;&lt;br /&gt;
for문.&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://cfs6.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczYudGlzdG9yeS5jb206L2F0dGFjaC8xLzEzMDAwMDAwMDEzOC5qcGc%3D&quot; width=&quot;425&quot; height=&quot;471&quot; /&gt;&lt;br /&gt;
무작정 10000번&lt;br /&gt;
몇배차이?&lt;br /&gt;
&lt;br /&gt;
결론은&lt;br /&gt;
&lt;strong&gt;컴파일러는 멍청이.&lt;/strong&gt;&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/347&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>C/C++</category>
			<category>c</category>
			<category>C언어</category>
			<category>실험</category>
			<author>　환타</author>
			<guid>http://zfanta.com/347</guid>
			<comments>http://zfanta.com/entry/for%EB%AC%B8-10000%EB%B2%88-VS-%EB%85%B8%EA%B0%80%EB%8B%A4-%ED%83%80%EC%9D%B4%ED%95%91-10000%EB%B2%88#entry347comment</comments>
			<pubDate>Fri, 22 Feb 2008 17:19:37 +0900</pubDate>
		</item>
		<item>
			<title>프로그램 실행시간 측정하기</title>
			<link>http://zfanta.com/entry/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%A8-%EC%8B%A4%ED%96%89%EC%8B%9C%EA%B0%84-%EC%B8%A1%EC%A0%95%ED%95%98%EA%B8%B0</link>
			<description>&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 455px; margin-top: 1px; margin-bottom: 1px; height: 317px; &quot;&gt;
#include &lt;stdio.h&gt;
#include &lt;time.h&gt;
main()
{
	clock_t start, end;
	int count,a;
	double result;

	start = clock();
	for(count=0;count&lt;10000;count++)
		printf(&quot; &quot;);

	end = clock();

	result = (double)(end-start) / CLOCKS_PER_SEC;

	printf(&quot;%f&quot;,result);
}&lt;/textarea&gt;&lt;br /&gt;
2번 줄처럼 #include &amp;lt;time.h&gt;를 넣어줘야돼요.&lt;br /&gt;
start,end 변수는 clock_t 로 선언하고 &lt;br /&gt;
측정 시작하고싶은 곳에 12번 줄처럼 해주시고 측정 끝내고 싶은 곳에 16번째 줄처럼 해주시면 됩니다.&lt;br /&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 580px; margin-top: 1px; margin-bottom: 1px; height: 45px; &quot;&gt;
start = clock();
end = clock();
&lt;/textarea&gt;&lt;br /&gt;
end-start 하면 실행시간을 알 수있는데 CLOCKS_PER_SEC로 나누어 줘야 해요.&lt;br /&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 581px; &quot;&gt;
result = (double)(end-start) / CLOCKS_PER_SEC;
&lt;/textarea&gt;&lt;br /&gt;
&lt;br /&gt;
오늘은 간단하게 이거만..........&lt;br /&gt;
&lt;div class=&quot;imageblock left&quot; style=&quot;float: left; margin-right: 10px;&quot;&gt;&lt;a href=&quot;http://cfs5.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczUudGlzdG9yeS5jb206L2F0dGFjaC8xLzEzMDAwMDAwMDE0OC5qcGc%3D&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfs5.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczUudGlzdG9yeS5jb206L2F0dGFjaC8xLzEzMDAwMDAwMDE0OC5qcGc%3D&quot; alt=&quot;사용자 삽입 이미지&quot; height=&quot;436&quot; width=&quot;669&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/345&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>C/C++</category>
			<category>c</category>
			<category>time.h</category>
			<category>프로그램</category>
			<author>　환타</author>
			<guid>http://zfanta.com/345</guid>
			<comments>http://zfanta.com/entry/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%A8-%EC%8B%A4%ED%96%89%EC%8B%9C%EA%B0%84-%EC%B8%A1%EC%A0%95%ED%95%98%EA%B8%B0#entry345comment</comments>
			<pubDate>Thu, 21 Feb 2008 16:45:43 +0900</pubDate>
		</item>
		<item>
			<title>난수 발생함수 rand(), 난수 범위 지정하기</title>
			<link>http://zfanta.com/entry/%EB%82%9C%EC%88%98-%EB%B0%9C%EC%83%9D%ED%95%A8%EC%88%98-rand-%EB%82%9C%EC%88%98-%EB%B2%94%EC%9C%84-%EC%A7%80%EC%A0%95%ED%95%98%EA%B8%B0</link>
			<description>프로그래밍 카테고리에도 글이 좀 쌓이는 것 같다. (8개?)&lt;br /&gt;
&lt;br /&gt;
난수 발생의 범위를 지정하는 방법, 요렇게&lt;br /&gt;
&lt;strong&gt;&lt;font size=&quot;4&quot;&gt;변수 = rand() % (종료 값 - 시작 값 + 1) + 시작 값&lt;/font&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;br /&gt;
100부터 1000 사이의 난수를 발생시키려면&lt;br /&gt;
&lt;strong&gt;변수 = rand() % (1000 - 100 + 1) + 100&lt;br /&gt;
&lt;/strong&gt;간단히 하면&lt;br /&gt;
&lt;strong&gt;변수 = rand() % (901) + 100&lt;br /&gt;
&lt;/strong&gt;이렇게 되지요.&lt;br /&gt;
&lt;br /&gt;
이건 난수 1,000개를 발생시켜서 최소값, 최대값 출력하는 소스.&lt;br /&gt;
&lt;br /&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 521px; margin-top: 1px; margin-bottom: 1px; height: 551px; &quot;&gt;
#include &lt;stdio.h&gt;
#include &lt;time.h&gt;
int main()
{
	int a;
	int start,end;
	int max,min;
	int count;

	srand((unsigned)time(NULL));

	printf(&quot;시작 : &quot;);
	scanf(&quot;%d&quot;,&amp;start);
	printf(&quot;종료 : &quot;);
	scanf(&quot;%d&quot;,&amp;end);

	min=end;
	max=start;

	for(count=0;count&lt;1000;count++)
	{
		a=rand() % (end - start + 1) + start;
		printf(&quot;%4d &quot;,a);

		if(min &gt; a)
			min=a;
		if(max &lt; a)
			max=a;
	}

	printf(&quot;\n최소 : %d&quot;,min);
	printf(&quot;\n최대 : %d&quot;,max);

	getch();
	return 0;
}&lt;/textarea&gt;&lt;br /&gt;
&lt;div class=&quot;imageblock center&quot; style=&quot;text-align: center; clear: both;&quot;&gt;&lt;a href=&quot;http://cfs6.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczYudGlzdG9yeS5jb206L2F0dGFjaC8xLzEzMDAwMDAwMDEzMC5qcGc%3D&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfs6.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczYudGlzdG9yeS5jb206L2F0dGFjaC8xLzEzMDAwMDAwMDEzMC5qcGc%3D&quot; alt=&quot;사용자 삽입 이미지&quot; class=&quot;tt-resampling&quot; height=&quot;435&quot; width=&quot;669&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
널려 있는 정보지만, 아니 뭐 그냥 그렇다구요. ㅜㅜ&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/335&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>C/C++</category>
			<category>c</category>
			<category>C언어</category>
			<category>rand</category>
			<category>random</category>
			<category>난수</category>
			<category>함수</category>
			<author>　환타</author>
			<guid>http://zfanta.com/335</guid>
			<comments>http://zfanta.com/entry/%EB%82%9C%EC%88%98-%EB%B0%9C%EC%83%9D%ED%95%A8%EC%88%98-rand-%EB%82%9C%EC%88%98-%EB%B2%94%EC%9C%84-%EC%A7%80%EC%A0%95%ED%95%98%EA%B8%B0#entry335comment</comments>
			<pubDate>Fri, 15 Feb 2008 17:21:34 +0900</pubDate>
		</item>
		<item>
			<title>C언어로 오목만들기 5 마지막.</title>
			<link>http://zfanta.com/entry/C%EC%96%B8%EC%96%B4%EB%A1%9C-%EC%98%A4%EB%AA%A9%EB%A7%8C%EB%93%A4%EA%B8%B0-5-%EB%A7%88%EC%A7%80%EB%A7%89</link>
			<description>오랜만에 오목포스팅 드디어 끝이다.&lt;br /&gt;
5번만에 끝나니 좀 아쉬워, 좀 더 우려먹으려고 했는데.&lt;br /&gt;
&lt;br /&gt;
이번에 추가한 건   흑,백추가(이게 전부  ㅡ,.ㅡ)&lt;br /&gt;
&lt;br /&gt;
1. 돌 5개 확인 함수 변경하기.&lt;br /&gt;
예전엔 돌 하나로도 잘 놀았지만 이젠 흑,백이 추가됐으니 인자 하나를 더 전달해 주어야 해요.&lt;br /&gt;
int check(x,y)함수를 변경해줍니다.&lt;br /&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 692px; margin-top: 1px; margin-bottom: 1px; height: 1179px; &quot;&gt;
int check(x,y,turn)
{
	int px,py;
	int count;
	//가로
	px=x;
	py=y;
	count=0;    

	while(px&gt;1 &amp;&amp; board[px-2][y] == turn)px-=2;
	while(px&lt;=36 &amp;&amp; board[px][y] == turn)
	{
		count++;
		px+=2;
	}

	if(count==5)
	{
		return 1;
	}

	//세로
	px=x;
	py=y;
	count=0;

	while(py&gt;0 &amp;&amp; board[x][py-1]==turn)py--;
	while(py&lt;=18 &amp;&amp; board[x][py++]==turn)count++;

	if(count==5)
	{
		return 1;
	}

	//대각선 ↘
	px=x;
	py=y;
	count=0;

	while(px &gt; 0 &amp;&amp; py &gt; 0 &amp;&amp; board[px-2][py-1]==turn)
	{
		px-=2;
		py--;
	}

	while(px&lt;=36 &amp;&amp; py&lt;=18 &amp;&amp; board[px][py++] == turn)
	{
		px+=2;
		count++;
	}
	if(count==5)
	{
		return 1;
	}

	//대각선 ↙
	px=x;
	py=y;
	count=0;

	while(px &lt; 36 &amp;&amp; py &gt; 0 &amp;&amp; board[px+2][py-1]==turn)
	{
		px+=2;
		py--;
	}

	while(px&gt;=0 &amp;&amp; py&lt;=18 &amp;&amp; board[px][py++] == turn)
	{
		px-=2;
		count++;
	}
	if(count==5)
	{
		return 1;
	}
	return 0;
}
&lt;/textarea&gt;
&lt;br /&gt;
2.문자열 &quot;흑&quot;,&quot;백&quot;도 추가, 흑돌,백돌도 추가&lt;br /&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-top: 1px; margin-bottom: 1px; height: 66px; margin-left: 0px; margin-right: 0px; width: 426px; &quot;&gt;
int turn=1;
char who[3][3]={&quot;&quot;,&quot;흑&quot;,&quot;백&quot;};
char stone[3][3]={&quot;&quot;,&quot;○&quot;,&quot;●&quot;};
&lt;/textarea&gt;
&lt;br /&gt;
3.case ENTER: 부분도 수정&lt;br /&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-top: 1px; margin-bottom: 1px; height: 305px; margin-left: 0px; margin-right: 0px; width: 584px; &quot;&gt;
case ENTER :
	if(board[x][y] == 0)
	{
		board[x][y]=turn;
		gotoxy(x,y);
		puts(stone[turn]);
		if(check(x,y,turn))
		{
			system(&quot;CLS&quot;);
			printf(&quot;%s 승리&quot;,who[turn]);
			system(&quot;PAUSE&quot;);
			exit(0);
		}
		turn++;
		if(turn==3)
			turn=1;
	}
	break;
&lt;/textarea&gt;
&lt;br /&gt;
4.마지막 오목소스&lt;br /&gt;
&lt;textarea class=&quot;c&quot; name=&quot;code&quot; style=&quot;margin-left: 0px; margin-right: 0px; width: 678px; margin-top: 1px; margin-bottom: 1px; height: 5085px; &quot;&gt;
#include &lt;stdio.h&gt;
#include &lt;windows.h&gt;
#define UP 72
#define DOWN 80
#define LEFT 75
#define RIGHT 77
#define ENTER 13

int x=0,y=0;
int oldx=0,oldy=0;
int board[38][19];
int turn=1;
char who[3][3]={&quot;&quot;,&quot;흑&quot;,&quot;백&quot;};
char stone[3][3]={&quot;&quot;,&quot;○&quot;,&quot;●&quot;}; 

void gotoxy(int, int);
void draw();
void move();
int knock(int,int);
int check(int,int,int);

int main()
{
	draw();
	while(1)
	{
		move();
	}


	system(&quot;PAUSE&quot;);    
	return 0;
}

void gotoxy(int x, int y) 
{
	COORD XY = {x, y};
	SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), XY);
}

void draw()
{        
	char a[39][39]=
	{
		&quot;┌┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┐&quot;,
		&quot;├┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┼┤&quot;,
		&quot;└┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┘&quot;
	};
	int count;
	printf(&quot;%s\n&quot;,a[0]); 
	for(count=0;count&lt;17;count++)
		printf(&quot;%s\n&quot;,a[1]);
	printf(&quot;%s&quot;,a[2]);
}

void move()
{
	char input=0;
	input=getch();

	switch(input)
	{
	case UP :
		if(y&gt;0)
		{
			y-=1;
			oldy=y+1;
			gotoxy(x,y);
			puts(&quot;⊙&quot;);
			if(knock(x,oldy))
			{
				gotoxy(x,oldy);
				if(oldy==18)
				{
					if(x==0)
					{
						puts(&quot;└&quot;);
					}
					if(x==36)
					{
						puts(&quot;┘&quot;);
					}
					else if(x!=0&amp;&amp;x!=36)
					{
						puts(&quot;┴&quot;);
					}
				}
				else if(x==0)
				{
					puts(&quot;├&quot;);
				}
				else if(x==36)
				{
					puts(&quot;┤&quot;);
				}
				else
				{
					puts(&quot;┼&quot;);
				}
			}

		}
		break;

	case DOWN :
		if(y&lt;18)
		{
			y+=1;
			oldy=y-1;
			gotoxy(x,y);
			puts(&quot;⊙&quot;);
			if(knock(x,oldy))
			{
				gotoxy(x,oldy);
				if(oldy==0)
				{
					if(x==0)
					{
						puts(&quot;┌&quot;);
					}
					if(x==36)
					{
						puts(&quot;┐&quot;);
					}
					else if(x!=0&amp;&amp;x!=36)
					{
						puts(&quot;┬&quot;);
					}
				}
				else if(x==0)
				{
					puts(&quot;├&quot;);
				}
				else if(x==36)
				{
					puts(&quot;┤&quot;);
				}
				else
				{
					puts(&quot;┼&quot;);
				}
			}

		}
		break;

	case LEFT :
		if(x&gt;0)
		{
			x-=2;
			oldx=x+2;
			gotoxy(x,y);
			puts(&quot;⊙&quot;);
			if(knock(oldx,y))
			{
				gotoxy(oldx,y);
				if(oldx==36)
				{
					if(y==0)
					{
						puts(&quot;┐&quot;);
					}
					if(y==18)
					{
						puts(&quot;┘&quot;);
					}
					else if(y!=0&amp;&amp;y!=36)
					{
						puts(&quot;┤&quot;);
					}
				}
				else if(y==18)
				{
					puts(&quot;┴&quot;);
				}
				else if(y==0)
				{
					puts(&quot;┬&quot;);
				}
				else
				{
					puts(&quot;┼&quot;);
				}
			}

		}
		break;

	case RIGHT :
		if(x&lt;36)
		{
			x+=2;
			oldx=x-2;
			gotoxy(x,y);
			puts(&quot;⊙&quot;);
			if(knock(oldx,y))
			{
				gotoxy(oldx,y);
				if(oldx==0)
				{
					if(y==0)
					{
						puts(&quot;┌&quot;);
					}
					if(y==18)
					{
						puts(&quot;└&quot;);
					}
					else if(y!=0&amp;&amp;y!=36)
					{
						puts(&quot;├&quot;);
					}
				}
				else if(y==18)
				{
					puts(&quot;┴&quot;);
				}
				else if(y==0)
				{
					puts(&quot;┬&quot;);
				}
				else
				{
					puts(&quot;┼&quot;);
				}
			}

		}
		break;
	case ENTER :
		if(board[x][y] == 0)
		{ 
			board[x][y]=turn;
			gotoxy(x,y);
			puts(stone[turn]);
			if(check(x,y,turn))
			{
				system(&quot;CLS&quot;);
				printf(&quot;%s 승리&quot;,who[turn]);
				system(&quot;PAUSE&quot;);
				exit(0);
			}
			turn++;
			if(turn==3)
				turn=1;
		}   
		break;
	}
}
int knock(x,y)
{
	gotoxy(x,y);
	puts(stone[board[x][y]]);
	if(board[x][y]!=0)
		return 0;

	else
		return 1;
}
int check(x,y,turn)
{
	int px,py;
	int count;
	//가로
	px=x;
	py=y;
	count=0;    

	while(px&gt;1 &amp;&amp; board[px-2][y] == turn)px-=2;
	while(px&lt;=36 &amp;&amp; board[px][y] == turn)
	{
		count++;
		px+=2;
	}

	if(count==5)
	{
		return 1;
	}

	//세로
	px=x;
	py=y;
	count=0;

	while(py&gt;0 &amp;&amp; board[x][py-1]==turn)py--;
	while(py&lt;=18 &amp;&amp; board[x][py++]==turn)count++;

	if(count==5)
	{
		return 1;
	}

	//대각선 ↘
	px=x;
	py=y;
	count=0;

	while(px &gt; 0 &amp;&amp; py &gt; 0 &amp;&amp; board[px-2][py-1]==turn)
	{
		px-=2;
		py--;
	}

	while(px&lt;=36 &amp;&amp; py&lt;=18 &amp;&amp; board[px][py++] == turn)
	{
		px+=2;
		count++;
	}
	if(count==5)
	{
		return 1;
	}

	//대각선 ↙
	px=x;
	py=y;
	count=0;

	while(px &lt; 36 &amp;&amp; py &gt; 0 &amp;&amp; board[px+2][py-1]==turn)
	{
		px+=2;
		py--;
	}

	while(px&gt;=0 &amp;&amp; py&lt;=18 &amp;&amp; board[px][py++] == turn)
	{
		px-=2;
		count++;
	}
	if(count==5)
	{
		return 1;
	}
	return 0;
}
&lt;/textarea&gt;
&lt;div class=&quot;imageblock center&quot; style=&quot;text-align: center; clear: both;&quot;&gt;&lt;a href=&quot;http://cfs5.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczUudGlzdG9yeS5jb206L2F0dGFjaC8xLzEzMDAwMDAwMDE0Mi5naWY%3D&quot; rel=&quot;lightbox&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://cfs5.tistory.com/upload_control/download.blog?fhandle=YmxvZzE2MjM2MEBmczUudGlzdG9yeS5jb206L2F0dGFjaC8xLzEzMDAwMDAwMDE0Mi5naWY%3D&quot; alt=&quot;사용자 삽입 이미지&quot; height=&quot;436&quot; width=&quot;669&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
이걸로 끝.&lt;br /&gt;
부족한 점이나 질문 있으시면 아래 리플로 ㄱㄱ&lt;br /&gt;&lt;div class=&quot;tt-plugin tt-share-entry-with-sns tt-sns-icon-alignment-right tt-sns-icon-size-small&quot;&gt;
	&lt;div class=&quot;tt-sns-wrap&quot; id=&quot;ttSnsWrap-&quot;&gt;
		&lt;ul class=&quot;tt-sns-service-default&quot;&gt;
			&lt;li class=&quot;tt-sns-service-mypeople&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('mypeople', '', '');&quot;&gt;마이피플&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-twitter&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('twitter', '', '');&quot;&gt;트위터&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-facebook&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('facebook', '', '');&quot;&gt;페이스북&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-other&quot;&gt;&lt;a href=&quot;javascript:;&quot; onmouseover=&quot;ShareEntryWithSNS.showLayer(event, '');&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;더보기&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
		&lt;ul class=&quot;tt-sns-service-more&quot; id=&quot;ttSnsServiceMore-&quot; onmouseout=&quot;ShareEntryWithSNS.hideLayer(event, '');&quot;&gt;
			&lt;li class=&quot;tt-sns-service-me2day&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('me2day', '', '');&quot;&gt;미투데이&lt;/a&gt;&lt;/li&gt;
			&lt;li class=&quot;tt-sns-service-yozm&quot;&gt;&lt;a href=&quot;javascript:;&quot; onclick=&quot;ShareEntryWithSNS.share('yozm', '', '');&quot;&gt;요즘&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/div&gt;
	&lt;div class=&quot;tt-sns-clear&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-news-widget&quot; style=&quot;width: 100%; text-align: center&quot;&gt;
		  					&lt;embed src=&quot;http://api.v.daum.net/static/recombox1.swf&quot; quality=&quot;high&quot; flashvars=&quot;nid=779069&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;false&quot; bgcolor=&quot;#ffffff&quot; width=&quot;400&quot; height=&quot;80&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot;&gt;&lt;/embed&gt;
						&lt;/div&gt;&lt;div style=&quot;text-align:right; padding-top:10px;&quot;&gt;
&lt;iframe src=&quot;http://www.facebook.com/plugins/like.php?href=zfanta.com/333&amp;amp;layout=button_count&amp;amp;show_faces=true&amp;amp;width=90&amp;amp;action=like&amp;amp;font=tahoma&amp;amp;colorscheme=light&amp;amp;height=65&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;border:none; overflow:hidden; width:90px; height:65px;&quot; allowTransparency=&quot;true&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
</description>
			<category>C/C++</category>
			<category>C언어</category>
			<category>소스</category>
			<category>오목</category>
			<category>오목게임</category>
			<author>　환타</author>
			<guid>http://zfanta.com/333</guid>
			<comments>http://zfanta.com/entry/C%EC%96%B8%EC%96%B4%EB%A1%9C-%EC%98%A4%EB%AA%A9%EB%A7%8C%EB%93%A4%EA%B8%B0-5-%EB%A7%88%EC%A7%80%EB%A7%89#entry333comment</comments>
			<pubDate>Thu, 14 Feb 2008 16:06:28 +0900</pubDate>
		</item>
	</channel>
</rss>
