<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mediawiki.zeropage.org/index.php?action=history&amp;feed=atom&amp;title=ThePriestMathematician%2F%EB%AC%B8%EB%B3%B4%EC%B0%BD</id>
	<title>ThePriestMathematician/문보창 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mediawiki.zeropage.org/index.php?action=history&amp;feed=atom&amp;title=ThePriestMathematician%2F%EB%AC%B8%EB%B3%B4%EC%B0%BD"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=ThePriestMathematician/%EB%AC%B8%EB%B3%B4%EC%B0%BD&amp;action=history"/>
	<updated>2026-05-14T20:06:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://mediawiki.zeropage.org/index.php?title=ThePriestMathematician/%EB%AC%B8%EB%B3%B4%EC%B0%BD&amp;diff=87257&amp;oldid=prev</id>
		<title>Maintenance script: Table transclusion repair v1</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=ThePriestMathematician/%EB%AC%B8%EB%B3%B4%EC%B0%BD&amp;diff=87257&amp;oldid=prev"/>
		<updated>2026-03-27T12:46:19Z</updated>

		<summary type="html">&lt;p&gt;Table transclusion repair v1&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:46, 27 March 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l4&quot;&gt;Line 4:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| 2006-01-11  Accepted 0.688 14280&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| 2006-01-11  Accepted 0.688 14280&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{| &lt;/del&gt;0.5a(a + 1) ≤ n, (a ≥ 0 이고, 수식을 만족하는 가장 큰 정수) &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;0.5a(a + 1) ≤ n, (a ≥ 0 이고, 수식을 만족하는 가장 큰 정수)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;그렇다면 입력 n 에 대하여 다음과 같은 식이 완성된다. a를 n에 대하여 바꿀 순 없을까?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;그렇다면 입력 n 에 대하여 다음과 같은 식이 완성된다. a를 n에 대하여 바꿀 순 없을까?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{| &lt;/del&gt;T(n) = 2&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;lt;&lt;/del&gt;sup&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;gt;&lt;/del&gt;a&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;lt;&lt;/del&gt;/sup&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;gt;&lt;/del&gt;(a - 1) + 1 + 2&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;lt;&lt;/del&gt;sup&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;gt;&lt;/del&gt;a&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;lt;&lt;/del&gt;/sup&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;gt;&lt;/del&gt;{n - 0.5 a ( a + 1 ) &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;} |}&lt;/del&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; &lt;/ins&gt;T(n) = 2&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;&lt;/ins&gt;sup&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt;&lt;/ins&gt;a&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;&lt;/ins&gt;/sup&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt;&lt;/ins&gt;(a - 1) + 1 + 2&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;&lt;/ins&gt;sup&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt;&lt;/ins&gt;a&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;&lt;/ins&gt;/sup&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt;&lt;/ins&gt;{n - 0.5 a ( a + 1 ) }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;p.s. 처음에는 k 개의 원반을 찾으려고 노력했으나, 실마리는 k 에 있지 않았다. 우리가 원하는 것은 k 를 찾는 것이 아니라 원반을 옮기는 총 횟수를 구하는 것이었다.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;p.s. 처음에는 k 개의 원반을 찾으려고 노력했으나, 실마리는 k 에 있지 않았다. 우리가 원하는 것은 k 를 찾는 것이 아니라 원반을 옮기는 총 횟수를 구하는 것이었다.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.zeropage.org/index.php?title=ThePriestMathematician/%EB%AC%B8%EB%B3%B4%EC%B0%BD&amp;diff=39654&amp;oldid=prev</id>
		<title>imported&gt;Unknown at 05:28, 7 February 2021</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=ThePriestMathematician/%EB%AC%B8%EB%B3%B4%EC%B0%BD&amp;diff=39654&amp;oldid=prev"/>
		<updated>2021-02-07T05:28:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== 소감 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 2006-01-11  Accepted 0.688 14280&lt;br /&gt;
|}&lt;br /&gt;
{{| 0.5a(a + 1) ≤ n, (a ≥ 0 이고, 수식을 만족하는 가장 큰 정수) |}}&lt;br /&gt;
그렇다면 입력 n 에 대하여 다음과 같은 식이 완성된다. a를 n에 대하여 바꿀 순 없을까?&lt;br /&gt;
{{| T(n) = 2&amp;amp;lt;sup&amp;amp;gt;a&amp;amp;lt;/sup&amp;amp;gt;(a - 1) + 1 + 2&amp;amp;lt;sup&amp;amp;gt;a&amp;amp;lt;/sup&amp;amp;gt;{n - 0.5 a ( a + 1 ) } |}}&lt;br /&gt;
&lt;br /&gt;
p.s. 처음에는 k 개의 원반을 찾으려고 노력했으나, 실마리는 k 에 있지 않았다. 우리가 원하는 것은 k 를 찾는 것이 아니라 원반을 옮기는 총 횟수를 구하는 것이었다.&lt;br /&gt;
&lt;br /&gt;
== 코드 ==&lt;br /&gt;
 // 10254 - The Priest Mathematician&lt;br /&gt;
 #include &amp;quot;BigInteger.h&amp;quot;&lt;br /&gt;
 using namespace BigMath;&lt;br /&gt;
 &lt;br /&gt;
 int findK(int n)&lt;br /&gt;
 {&lt;br /&gt;
 	int i;&lt;br /&gt;
 	for (i = 0; ; i++)&lt;br /&gt;
 		if (0.5 * i * (i + 1) &amp;amp;gt; n)&lt;br /&gt;
 			break;&lt;br /&gt;
 	return i - 1;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 void process(int n)&lt;br /&gt;
 {&lt;br /&gt;
 	if (n == 0)&lt;br /&gt;
 	{&lt;br /&gt;
 		cout &amp;amp;lt;&amp;amp;lt; 0 &amp;amp;lt;&amp;amp;lt; endl;&lt;br /&gt;
 		return;&lt;br /&gt;
 	}&lt;br /&gt;
 	int k, temp;&lt;br /&gt;
 	BigInteger result, kpow2(2);&lt;br /&gt;
 	k = findK(n);&lt;br /&gt;
 	temp = n - 0.5 * k * (k + 1);&lt;br /&gt;
 	kpow2 = kpow2.Power(k);&lt;br /&gt;
 	result = kpow2 * (k - 1) + 1 + temp * kpow2;&lt;br /&gt;
 	cout &amp;amp;lt;&amp;amp;lt; result &amp;amp;lt;&amp;amp;lt; endl;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 int main()&lt;br /&gt;
 {&lt;br /&gt;
 	int n;&lt;br /&gt;
 	while (cin &amp;amp;gt;&amp;amp;gt; n)&lt;br /&gt;
 		process(n);&lt;br /&gt;
 	return 0;&lt;br /&gt;
 }&lt;br /&gt;
----&lt;br /&gt;
[[ThePriestMathematician]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Unknown</name></author>
	</entry>
</feed>