<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>算術・代入演算メニュー - IQパズルステップ</title>
	<atom:link href="https://chokomon.com/tag/arithmetic/feed/" rel="self" type="application/rss+xml" />
	<link>https://chokomon.com</link>
	<description>ちょこっと頭を良くするIQパズル問題集</description>
	<lastBuildDate>Tue, 21 Jun 2022 12:36:59 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://chokomon.com/wp-content/uploads/2022/02/cropped-icon512-32x32.png</url>
	<title>算術・代入演算メニュー - IQパズルステップ</title>
	<link>https://chokomon.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>【算術・代入演算メニュー】代入演算 4 (paizaランク D)-解答例-PHP編</title>
		<link>https://chokomon.com/05-arithmetic-02-04-00181/</link>
					<comments>https://chokomon.com/05-arithmetic-02-04-00181/#respond</comments>
		
		<dc:creator><![CDATA[東鳥子]]></dc:creator>
		<pubDate>Sun, 01 May 2022 05:44:52 +0000</pubDate>
				<category><![CDATA[paiza-問題集]]></category>
		<category><![CDATA[算術・代入演算メニュー]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ランクD]]></category>
		<category><![CDATA[難易度-800以下]]></category>
		<guid isPermaLink="false">https://chokomon.com/?p=2906</guid>

					<description><![CDATA[【算術・代入演算メニュー】&#62; FINAL問題【代入演算 4】代入演算 4 (paizaランク D 相当)&#160;[難易度:&#160;756&#160;±20] ※リンク先へ移動するためには[paiza]へのログインが必要です。 …]]></description>
										<content:encoded><![CDATA[
<p>【<a href="https://chokomon.com/paiza_mondai/05-arithmetic/">算術・代入演算メニュー</a>】&gt; <a href="https://paiza.jp/works/mondai/arithmetic_substitution_op/arithmetic_substitution_op__substitution_step4" target="_blank" rel="noreferrer noopener">FINAL問題【代入演算 4】代入演算 4 (paizaランク D 相当)</a>&nbsp;[難易度:&nbsp;<strong>756&nbsp;±20</strong>]



<p>※リンク先へ移動するためには[<a href="https://paiza.jp/works" target="_blank" rel="noreferrer noopener">paiza</a>]へのログインが必要です。</p>



<figure class="wp-block-image aligncenter size-full"><img fetchpriority="high" decoding="async" width="660" height="300" src="https://chokomon.com/wp-content/uploads/2022/05/05-02-04-01.png" alt="" class="wp-image-2908"/></figure>



<div class="wp-block-dvaux-frame sc_frame_wrap inline"><div class="sc_frame_title inline" style="background-color:#ccc">問題文</div><div class="sc_frame" style="background-color:#fff;border-color:#ccc">
<p>整数 A, B が与えられます。以下のアルゴリズムを実行してください。</p>



<p>変数 N を 10,000 で初期化する<br>N を A で割った商を N へ代入する<br>N を B で割った余りを N へ代入する<br>N を出力する</p>



<p></p>



<p><strong>入力値（例）</strong><br>911 285</p>



<p><strong>出力値（例）</strong><br>10</p>
</div></div>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">解答例</h2>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">&lt;?php
// 変数 N を 10,000 で初期化する
// N を A で割った商を N へ代入する
// N を B で割った余りを N へ代入する
// N を出力する

list($a, $b) = explode(" ", trim(fgets(STDIN)));

$n = 10000;
$n /= $a;
$n %= $b;

echo $n;
?&gt;</pre></div>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="660" height="160" src="https://chokomon.com/wp-content/uploads/2022/05/05-02-04-02.png" alt="" class="wp-image-2909"/></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://chokomon.com/05-arithmetic-02-04-00181/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>【算術・代入演算メニュー】代入演算 2 (paizaランク D)-解答例-PHP編</title>
		<link>https://chokomon.com/05-arithmetic-02-02-00179/</link>
					<comments>https://chokomon.com/05-arithmetic-02-02-00179/#respond</comments>
		
		<dc:creator><![CDATA[東鳥子]]></dc:creator>
		<pubDate>Sat, 30 Apr 2022 07:00:59 +0000</pubDate>
				<category><![CDATA[paiza-問題集]]></category>
		<category><![CDATA[算術・代入演算メニュー]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ランクD]]></category>
		<category><![CDATA[難易度-800以下]]></category>
		<guid isPermaLink="false">https://chokomon.com/?p=2893</guid>

					<description><![CDATA[【算術・代入演算メニュー】> 【代入演算 4】STEP: 2 代入演算 2 (paizaランク D 相当) [難易度: 743 ±23] ※リンク先へ移動するためには[paiza]へのログインが必要です。 解答例]]></description>
										<content:encoded><![CDATA[
<p>【<a href="https://chokomon.com/paiza_mondai/05-arithmetic/">算術・代入演算メニュー</a>】> <a href="https://paiza.jp/works/mondai/arithmetic_substitution_op/arithmetic_substitution_op__substitution_step2" target="_blank" rel="noreferrer noopener">【代入演算 4】STEP: 2 代入演算 2 (paizaランク D 相当)</a> [難易度: <strong>743 ±23</strong>]



<p>※リンク先へ移動するためには[<a href="https://paiza.jp/works" target="_blank" rel="noreferrer noopener">paiza</a>]へのログインが必要です。</p>



<figure class="wp-block-image aligncenter size-full"><img decoding="async" width="660" height="300" src="https://chokomon.com/wp-content/uploads/2022/04/05-02-02-01.png" alt="" class="wp-image-2895"/></figure>



<div class="wp-block-dvaux-frame sc_frame_wrap inline"><div class="sc_frame_title inline" style="background-color:#ccc">問題文</div><div class="sc_frame" style="background-color:#fff;border-color:#ccc">
<p>整数 A, B, C が与えられます。以下のアルゴリズムを実行してください。</p>



<p>変数 N を 0 で初期化する<br>N に A を足した値を N へ代入する<br>N に B をかけた値を N へ代入する<br>N を C で割ったあまりを N へ代入する<br>N を出力する</p>



<p></p>



<p><strong>入力値（例）</strong><br>149 825 262</p>



<p><strong>出力値（例）</strong><br>47</p>
</div></div>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">解答例</h2>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">&lt;?php
// 変数 N を 0 で初期化する
// N に A を足した値を N へ代入する
// N に B をかけた値を N へ代入する
// N を C で割ったあまりを N へ代入する
// N を出力する

list($a, $b, $c) = explode(" ", trim(fgets(STDIN)));

$n = 0;
$n += $a;
$n *= $b;
$n %= $c;
echo $n;
?&gt;</pre></div>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="660" height="160" src="https://chokomon.com/wp-content/uploads/2022/04/05-02-02-02.png" alt="" class="wp-image-2896"/></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://chokomon.com/05-arithmetic-02-02-00179/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>【算術・代入演算メニュー】代入演算 1 (paizaランク D)-解答例-PHP編</title>
		<link>https://chokomon.com/05-arithmetic-02-01-00178/</link>
					<comments>https://chokomon.com/05-arithmetic-02-01-00178/#respond</comments>
		
		<dc:creator><![CDATA[東鳥子]]></dc:creator>
		<pubDate>Fri, 29 Apr 2022 08:39:43 +0000</pubDate>
				<category><![CDATA[paiza-問題集]]></category>
		<category><![CDATA[算術・代入演算メニュー]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ランクD]]></category>
		<category><![CDATA[難易度-800以下]]></category>
		<guid isPermaLink="false">https://chokomon.com/?p=2886</guid>

					<description><![CDATA[【算術・代入演算メニュー】> 【代入演算 4】STEP: 1 代入演算 1 (paizaランク D 相当) [難易度: 838 ±20] ※リンク先へ移動するためには[paiza]へのログインが必要です。 解答例]]></description>
										<content:encoded><![CDATA[
<p>【<a href="https://chokomon.com/paiza_mondai/05-arithmetic/">算術・代入演算メニュー</a>】> <a href="https://paiza.jp/works/mondai/arithmetic_substitution_op/arithmetic_substitution_op__substitution_step1" target="_blank" rel="noreferrer noopener">【代入演算 4】STEP: 1 代入演算 1 (paizaランク D 相当)</a> [難易度: <strong>838 ±20</strong>]



<p>※リンク先へ移動するためには[<a href="https://paiza.jp/works" target="_blank" rel="noreferrer noopener">paiza</a>]へのログインが必要です。</p>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="660" height="300" src="https://chokomon.com/wp-content/uploads/2022/04/05-02-01-01.png" alt="" class="wp-image-2888"/></figure>



<div class="wp-block-dvaux-frame sc_frame_wrap inline"><div class="sc_frame_title inline" style="background-color:#ccc">問題文</div><div class="sc_frame" style="background-color:#fff;border-color:#ccc">
<p>以下のアルゴリズムを実行してください。</p>



<p>変数Nを0で初期化する<br>Nに3,286を足した値をNへ代入する<br>Nに4,736をかけた値をNへ代入する<br>Nを12,312で割った余りをNへ代入する<br>Nを出力する</p>
</div></div>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">解答例</h2>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">&lt;?php
// 変数 N を 0 で初期化する
// N に 3,286 を足した値を N へ代入する
// N に 4,736 をかけた値を N へ代入する
// N を 12,312 で割った余りを N へ代入する
// N を出力する

$n = 0;
$n = ($n + 3286);
$n = ($n * 4736);
$n = ($n % 12312);
echo $n;
?&gt;</pre></div>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="660" height="160" src="https://chokomon.com/wp-content/uploads/2022/04/05-02-01-02.png" alt="" class="wp-image-2890"/></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://chokomon.com/05-arithmetic-02-01-00178/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>【算術・代入演算メニュー】累乗 2 (paizaランク D)-解答例-PHP編</title>
		<link>https://chokomon.com/05-arithmetic-01-06-00177/</link>
					<comments>https://chokomon.com/05-arithmetic-01-06-00177/#respond</comments>
		
		<dc:creator><![CDATA[東鳥子]]></dc:creator>
		<pubDate>Fri, 29 Apr 2022 00:24:20 +0000</pubDate>
				<category><![CDATA[paiza-問題集]]></category>
		<category><![CDATA[算術・代入演算メニュー]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ランクD]]></category>
		<category><![CDATA[難易度-800以下]]></category>
		<guid isPermaLink="false">https://chokomon.com/?p=2879</guid>

					<description><![CDATA[【算術・代入演算メニュー】&#62; FINAL問題【累乗 2】累乗 2 (paizaランク D 相当)&#160;[難易度:&#160;899&#160;±17] ※リンク先へ移動するためには[paiza]へのログインが必要です。 解答例]]></description>
										<content:encoded><![CDATA[
<p>【<a href="https://chokomon.com/paiza_mondai/05-arithmetic/">算術・代入演算メニュー</a>】&gt; <a rel="noreferrer noopener" href="https://paiza.jp/works/mondai/arithmetic_substitution_op/arithmetic_substitution_op__arithmetic_step6" target="_blank">FINAL問題【累乗 2】累乗 2 (paizaランク D 相当)</a>&nbsp;[難易度:&nbsp;<strong>899&nbsp;±17</strong>]



<p>※リンク先へ移動するためには[<a rel="noreferrer noopener" href="https://paiza.jp/works" target="_blank">paiza</a>]へのログインが必要です。</p>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="660" height="300" src="https://chokomon.com/wp-content/uploads/2022/04/05-01-06-01.png" alt="" class="wp-image-2880"/></figure>



<div class="wp-block-dvaux-frame sc_frame_wrap inline"><div class="sc_frame_title inline" style="background-color:#ccc">問題文</div><div class="sc_frame" style="background-color:#fff;border-color:#ccc">
<p>整数 A, B, C, D が与えられます。　</p>



<figure class="wp-block-image"><img decoding="async" src="https://latex.codecogs.com/gif.latex?((A+B)*C)^%202%20\bmod%20D" alt=""/></figure>



<p>　を計算した結果を出力してください。ここで、X mod Dとは X を D で割った余りを指します。</p>



<p></p>



<p><strong>入力値（例）</strong><br>28 57 33 73</p>



<p><strong>出力値（例）</strong><br>12</p>
</div></div>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">解答例</h2>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">&lt;?php
    list($a, $b, $c, $d) = explode(" ", trim(fgets(STDIN)));
    
    $ans = pow(($a +  $b) * $c, 2) % $d;
    echo $ans;
?&gt;</pre></div>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="660" height="160" src="https://chokomon.com/wp-content/uploads/2022/04/05-01-06-02.png" alt="" class="wp-image-2881"/></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://chokomon.com/05-arithmetic-01-06-00177/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>【算術・代入演算メニュー】累乗 (paizaランク D)-解答例-PHP編</title>
		<link>https://chokomon.com/05-arithmetic-01-05-00176/</link>
					<comments>https://chokomon.com/05-arithmetic-01-05-00176/#respond</comments>
		
		<dc:creator><![CDATA[東鳥子]]></dc:creator>
		<pubDate>Fri, 29 Apr 2022 00:05:42 +0000</pubDate>
				<category><![CDATA[paiza-問題集]]></category>
		<category><![CDATA[算術・代入演算メニュー]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ランクD]]></category>
		<category><![CDATA[難易度-800以下]]></category>
		<guid isPermaLink="false">https://chokomon.com/?p=2870</guid>

					<description><![CDATA[【算術・代入演算メニュー】> 【累乗 2】STEP: 5 累乗 (paizaランク D 相当) [難易度: 794 ±21] ※リンク先へ移動するためには[paiza]へのログインが必要です。 解答例 メモ pow()...べき乗を返す数学…]]></description>
										<content:encoded><![CDATA[
<p>【<a href="https://chokomon.com/paiza_mondai/05-arithmetic/">算術・代入演算メニュー</a>】> <a href="https://paiza.jp/works/mondai/arithmetic_substitution_op/arithmetic_substitution_op__arithmetic_step5" target="_blank" rel="noreferrer noopener">【累乗 2】STEP: 5 累乗 (paizaランク D 相当)</a> [難易度: <strong>794 ±21</strong>]



<p>※リンク先へ移動するためには[<a href="https://paiza.jp/works" target="_blank" rel="noreferrer noopener">paiza</a>]へのログインが必要です。</p>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="660" height="300" src="https://chokomon.com/wp-content/uploads/2022/04/05-01-05-01.png" alt="" class="wp-image-2871"/></figure>



<div class="wp-block-dvaux-frame sc_frame_wrap inline"><div class="sc_frame_title inline" style="background-color:#ccc">問題文</div><div class="sc_frame" style="background-color:#fff;border-color:#ccc">
<p>整数 A = 202、B = 134、C = 107 とします。&nbsp;</p>



<figure class="wp-block-image is-resized"><img loading="lazy" decoding="async" src="https://latex.codecogs.com/gif.latex?((A+B)*C)^%202" alt="" width="114" height="21"/></figure>



<p>を計算した結果を出力してください。</p>
</div></div>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">解答例</h2>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">&lt;?php
    $a = 202;
    $b = 134;
    $c = 107;
    
    $ans = pow(($a + $b) * $c, 2);
    echo $ans;
?&gt;</pre></div>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="660" height="160" src="https://chokomon.com/wp-content/uploads/2022/04/05-01-05-02.png" alt="" class="wp-image-2873"/></figure>



<h2 class="wp-block-heading">メモ</h2>



<p><strong>pow()</strong>...べき乗を返す数学関数。</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">&lt;?php
$a = pow(4, 2);
echo $a; //16(=4の2乗）
?&gt;</pre></div>
]]></content:encoded>
					
					<wfw:commentRss>https://chokomon.com/05-arithmetic-01-05-00176/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>【算術・代入演算メニュー】掛け算 2 (paizaランク D)-解答例-PHP編</title>
		<link>https://chokomon.com/05-arithmetic-01-04-00174/</link>
					<comments>https://chokomon.com/05-arithmetic-01-04-00174/#respond</comments>
		
		<dc:creator><![CDATA[東鳥子]]></dc:creator>
		<pubDate>Thu, 28 Apr 2022 05:52:16 +0000</pubDate>
				<category><![CDATA[paiza-問題集]]></category>
		<category><![CDATA[算術・代入演算メニュー]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ランクD]]></category>
		<category><![CDATA[難易度-800以下]]></category>
		<guid isPermaLink="false">https://chokomon.com/?p=2855</guid>

					<description><![CDATA[【算術・代入演算メニュー】> 【累乗 2】STEP: 4 掛け算 2 (paizaランク D 相当) [難易度: 742 ±21] ※リンク先へ移動するためには[paiza]へのログインが必要です。 解答例]]></description>
										<content:encoded><![CDATA[
<p>【<a href="https://chokomon.com/paiza_mondai/05-arithmetic/">算術・代入演算メニュー</a>】> <a href="https://paiza.jp/works/mondai/arithmetic_substitution_op/arithmetic_substitution_op__arithmetic_step4" target="_blank" rel="noreferrer noopener">【累乗 2】STEP: 4 掛け算 2 (paizaランク D 相当)</a> [難易度: <strong>742 ±21</strong>]



<p>※リンク先へ移動するためには[<a href="https://paiza.jp/works" target="_blank" rel="noreferrer noopener">paiza</a>]へのログインが必要です。</p>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="660" height="300" src="https://chokomon.com/wp-content/uploads/2022/04/05-01-04-01.png" alt="" class="wp-image-2856"/></figure>



<div class="wp-block-dvaux-frame sc_frame_wrap inline"><div class="sc_frame_title inline" style="background-color:#ccc">問題文</div><div class="sc_frame" style="background-color:#fff;border-color:#ccc">
<p>整数 A, B, C が与えられます。<code><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-light-orange-color">A * A</mark></code>の計算結果 X と<code><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-light-orange-color">B * B + C * C</mark></code>の計算結果 Y を半角スペース区切りで出力してください。</p>



<p></p>



<p><strong>入力値（例）</strong><br>202 400 37</p>



<p><strong>出力値（例）</strong><br>40804 161369</p>
</div></div>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">解答例</h2>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">&lt;?php
    list($a, $b, $c) = explode(" ", trim(fgets(STDIN)));
    
    $x = $a * $a;
    $y = ($b * $b) + ($c * $c);
    
    echo $x. " ". $y;
?&gt;</pre></div>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="660" height="160" src="https://chokomon.com/wp-content/uploads/2022/04/05-01-04-02.png" alt="" class="wp-image-2857"/></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://chokomon.com/05-arithmetic-01-04-00174/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>【算術・代入演算メニュー】割り算 (paizaランク D)-解答例-PHP編</title>
		<link>https://chokomon.com/05-arithmetic-01-03-00173/</link>
					<comments>https://chokomon.com/05-arithmetic-01-03-00173/#respond</comments>
		
		<dc:creator><![CDATA[東鳥子]]></dc:creator>
		<pubDate>Wed, 27 Apr 2022 13:11:37 +0000</pubDate>
				<category><![CDATA[paiza-問題集]]></category>
		<category><![CDATA[算術・代入演算メニュー]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ランクD]]></category>
		<category><![CDATA[難易度-800以下]]></category>
		<guid isPermaLink="false">https://chokomon.com/?p=2847</guid>

					<description><![CDATA[【算術・代入演算メニュー】> 【累乗 2】STEP: 3 割り算 (paizaランク D 相当) [難易度: 814 ±20] ※リンク先へ移動するためには[paiza]へのログインが必要です。 解答例]]></description>
										<content:encoded><![CDATA[
<p>【<a href="https://chokomon.com/paiza_mondai/05-arithmetic/">算術・代入演算メニュー</a>】> <a href="https://paiza.jp/works/mondai/arithmetic_substitution_op/arithmetic_substitution_op__arithmetic_step3" target="_blank" rel="noreferrer noopener">【累乗 2】STEP: 3 割り算 (paizaランク D 相当)</a> [難易度: <strong>814 ±20</strong>]



<p>※リンク先へ移動するためには[<a href="https://paiza.jp/works" target="_blank" rel="noreferrer noopener">paiza</a>]へのログインが必要です。</p>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="660" height="300" src="https://chokomon.com/wp-content/uploads/2022/04/05-01-03-01.png" alt="" class="wp-image-2848"/></figure>



<div class="wp-block-dvaux-frame sc_frame_wrap inline"><div class="sc_frame_title inline" style="background-color:#ccc">問題文</div><div class="sc_frame" style="background-color:#fff;border-color:#ccc">
<p>整数 A = 437,326、 B = 9,085 とします。以下の二つの演算の結果を半角スペース区切りで出力してください。</p>



<p>1. A を B で割った商<br>2. A を B で割った余り</p>



<p></p>



<p><strong>入力値（例）</strong><br>なし</p>



<p><strong>出力値</strong><br>x y</p>
</div></div>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">解答例</h2>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">&lt;?php
    //A = 437,326、 B = 9,085
    $a = 437326;
    $b = 9085;
    
    $x = floor($a / $b);
    $y = ($a % $b);
    
    echo $x. " ". $y;
?&gt;</pre></div>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="660" height="160" src="https://chokomon.com/wp-content/uploads/2022/04/05-01-03-02.png" alt="" class="wp-image-2849"/></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://chokomon.com/05-arithmetic-01-03-00173/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>【算術・代入演算メニュー】引き算・掛け算 (paizaランク D)-解答例-PHP編</title>
		<link>https://chokomon.com/05-arithmetic-01-02-00172/</link>
					<comments>https://chokomon.com/05-arithmetic-01-02-00172/#respond</comments>
		
		<dc:creator><![CDATA[東鳥子]]></dc:creator>
		<pubDate>Wed, 27 Apr 2022 12:28:47 +0000</pubDate>
				<category><![CDATA[paiza-問題集]]></category>
		<category><![CDATA[算術・代入演算メニュー]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ランクD]]></category>
		<category><![CDATA[難易度-800以下]]></category>
		<guid isPermaLink="false">https://chokomon.com/?p=2842</guid>

					<description><![CDATA[【算術・代入演算メニュー】> 【累乗 2】STEP: 2 引き算・掛け算 (paizaランク D 相当) [難易度: 890 ±18] ※リンク先へ移動するためには[paiza]へのログインが必要です。 解答例]]></description>
										<content:encoded><![CDATA[
<p>【<a href="https://chokomon.com/paiza_mondai/05-arithmetic/">算術・代入演算メニュー</a>】> <a href="https://paiza.jp/works/mondai/arithmetic_substitution_op/arithmetic_substitution_op__arithmetic_step2" target="_blank" rel="noreferrer noopener">【累乗 2】STEP: 2 引き算・掛け算 (paizaランク D 相当)</a> [難易度: <strong>890 ±18</strong>]



<p>※リンク先へ移動するためには[<a rel="noreferrer noopener" href="https://paiza.jp/works" target="_blank">paiza</a>]へのログインが必要です。</p>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="660" height="300" src="https://chokomon.com/wp-content/uploads/2022/04/05-01-02-01.png" alt="" class="wp-image-2843"/></figure>



<div class="wp-block-dvaux-frame sc_frame_wrap inline"><div class="sc_frame_title inline" style="background-color:#ccc">問題文</div><div class="sc_frame" style="background-color:#fff;border-color:#ccc">
<p>整数 A, B が与えられます。A と B の差 D と積 P を半角スペース区切りで出力してください。</p>



<p></p>



<p><strong>入力値（例）</strong><br>397 646</p>



<p><strong>出力値（例）</strong><br>-249 256462</p>
</div></div>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">解答例</h2>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">&lt;?php
    list($a, $b) = explode(" ", trim(fgets(STDIN)));
    
    $d = ($a - $b);
    $p = ($a * $b);
    
    echo $d. " ". $p;
?&gt;</pre></div>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="660" height="160" src="https://chokomon.com/wp-content/uploads/2022/04/05-01-02-02.png" alt="" class="wp-image-2844"/></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://chokomon.com/05-arithmetic-01-02-00172/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>【算術・代入演算メニュー】足し算 (paizaランク D)-解答例-PHP編</title>
		<link>https://chokomon.com/05-arithmetic-01-01-00170/</link>
					<comments>https://chokomon.com/05-arithmetic-01-01-00170/#respond</comments>
		
		<dc:creator><![CDATA[東鳥子]]></dc:creator>
		<pubDate>Tue, 26 Apr 2022 07:46:44 +0000</pubDate>
				<category><![CDATA[paiza-問題集]]></category>
		<category><![CDATA[算術・代入演算メニュー]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ランクD]]></category>
		<category><![CDATA[難易度-800以下]]></category>
		<guid isPermaLink="false">https://chokomon.com/?p=2828</guid>

					<description><![CDATA[【算術・代入演算メニュー】> 【累乗 2】STEP: 1 足し算 (paizaランク D 相当) [難易度: 643 ±21] ※リンク先へ移動するためには[paiza]へのログインが必要です。 解答例]]></description>
										<content:encoded><![CDATA[
<p>【<a href="https://chokomon.com/paiza_mondai/05-arithmetic/">算術・代入演算メニュー</a>】> <a href="https://paiza.jp/works/mondai/arithmetic_substitution_op/arithmetic_substitution_op__arithmetic_step1" target="_blank" rel="noreferrer noopener">【累乗 2】STEP: 1 足し算 (paizaランク D 相当)</a> [難易度: <strong>643 ±21</strong>]



<p>※リンク先へ移動するためには[<a rel="noreferrer noopener" href="https://paiza.jp/works" target="_blank">paiza</a>]へのログインが必要です。</p>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="660" height="300" src="https://chokomon.com/wp-content/uploads/2022/04/05-01-01-01.png" alt="" class="wp-image-2829"/></figure>



<div class="wp-block-dvaux-frame sc_frame_wrap inline"><div class="sc_frame_title inline" style="background-color:#ccc">問題文</div><div class="sc_frame" style="background-color:#fff;border-color:#ccc">
<p>1,231 と 5,178 の和を出力してください。</p>



<p></p>



<p><strong>入力値（例）</strong><br>なし</p>



<p><strong>出力値（例）</strong><br>N</p>
</div></div>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 class="wp-block-heading">解答例</h2>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">&lt;?php
    $ans = (1231 + 5178);
    echo $ans;
?&gt;</pre></div>



<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="660" height="160" src="https://chokomon.com/wp-content/uploads/2022/04/05-01-01-02.png" alt="" class="wp-image-2830"/></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://chokomon.com/05-arithmetic-01-01-00170/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
