Skip to content

Commit

Permalink
Site updated: 2023-09-24 09:45:15
Browse files Browse the repository at this point in the history
  • Loading branch information
fengxiaop committed Sep 24, 2023
1 parent 246c282 commit 713b81b
Show file tree
Hide file tree
Showing 75 changed files with 900 additions and 2,131 deletions.
12 changes: 6 additions & 6 deletions 2021/10/12/nginx搭建前端项目/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 2021/10/13/leetcode_412/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ <h1 class="post-title" itemprop="name headline">
<p>输入:n = 3<br>输出:[“1”,”2”,”Fizz”]<br>示例 2:</p>
<p>输入:n = 5<br>输出:[“1”,”2”,”Fizz”,”4”,”Buzz”]<br>示例 3:</p>
<p>输入:n = 15<br>输出:[“1”,”2”,”Fizz”,”4”,”Buzz”,”Fizz”,”7”,”8”,”Fizz”,”Buzz”,”11”,”Fizz”,”13”,”14”,”FizzBuzz”]</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><code class="hljs java"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Solution</span> </span>&#123;<br> <span class="hljs-function"><span class="hljs-keyword">public</span> List&lt;String&gt; <span class="hljs-title">fizzBuzz</span><span class="hljs-params">(<span class="hljs-keyword">int</span> n)</span> </span>&#123;<br> List&lt;String&gt; li = <span class="hljs-keyword">new</span> ArrayList&lt;&gt;();<br> <span class="hljs-keyword">for</span>(Integer i=<span class="hljs-number">1</span>;i&lt;=n;i++)<br> &#123; <br> <span class="hljs-keyword">if</span>(i % <span class="hljs-number">3</span> == <span class="hljs-number">0</span> &amp;&amp; i % <span class="hljs-number">5</span> == <span class="hljs-number">0</span>) li.add(<span class="hljs-string">&quot;FizzBuzz&quot;</span>);<br> <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span>(i%<span class="hljs-number">3</span>==<span class="hljs-number">0</span>)li.add(<span class="hljs-string">&quot;Fizz&quot;</span>);<br> <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span>(i%<span class="hljs-number">5</span>==<span class="hljs-number">0</span>)li.add(<span class="hljs-string">&quot;Buzz&quot;</span>);<br> <span class="hljs-keyword">else</span> li.add(i.toString());<br> &#125;<br> <span class="hljs-keyword">return</span> li;<br> &#125;<br>&#125;<br></code></pre></td></tr></table></figure>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">Solution</span> </span>&#123;</span><br><span class="line"> <span class="function"><span class="keyword">public</span> List&lt;String&gt; <span class="title">fizzBuzz</span><span class="params">(<span class="keyword">int</span> n)</span> </span>&#123;</span><br><span class="line"> List&lt;String&gt; li = <span class="keyword">new</span> ArrayList&lt;&gt;();</span><br><span class="line"> <span class="keyword">for</span>(Integer i=<span class="number">1</span>;i&lt;=n;i++)</span><br><span class="line"> &#123; </span><br><span class="line"> <span class="keyword">if</span>(i % <span class="number">3</span> == <span class="number">0</span> &amp;&amp; i % <span class="number">5</span> == <span class="number">0</span>) li.add(<span class="string">&quot;FizzBuzz&quot;</span>);</span><br><span class="line"> <span class="keyword">else</span> <span class="keyword">if</span>(i%<span class="number">3</span>==<span class="number">0</span>)li.add(<span class="string">&quot;Fizz&quot;</span>);</span><br><span class="line"> <span class="keyword">else</span> <span class="keyword">if</span>(i%<span class="number">5</span>==<span class="number">0</span>)li.add(<span class="string">&quot;Buzz&quot;</span>);</span><br><span class="line"> <span class="keyword">else</span> li.add(i.toString());</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">return</span> li;</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>


</div>
Expand Down
2 changes: 1 addition & 1 deletion 2021/10/13/绩点计算器/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ <h1 class="post-title" itemprop="name headline">
<p>所以自己想了一下自己可以写一个绩点计算器出来吗 好像也不是很难的样子</p>
<p>所以自己用了差不多20分钟帮这个写出来了</p>
<p>下面是源码</p>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br></pre></td><td class="code"><pre><code class="hljs c"><span class="hljs-meta">#<span class="hljs-meta-keyword">include</span><span class="hljs-meta-string">&lt;stdio.h&gt;</span></span><br><br><span class="hljs-function"><span class="hljs-keyword">int</span> <span class="hljs-title">main</span><span class="hljs-params">()</span></span><br><span class="hljs-function"></span><br><span class="hljs-function"></span>&#123;<br><br> <span class="hljs-keyword">int</span> number;<br><br> <span class="hljs-keyword">float</span> score;<br><br> <span class="hljs-keyword">float</span> credit,creditsum=<span class="hljs-number">0</span>; <br><br> <span class="hljs-keyword">float</span> gpasum=<span class="hljs-number">0.0</span>,GPA=<span class="hljs-number">0.0</span>;<br><br> <span class="hljs-built_in">printf</span>(<span class="hljs-string">&quot;请输入需要计算的科目数量&quot;</span>);<br><br> <span class="hljs-built_in">scanf</span>(<span class="hljs-string">&quot;%d&quot;</span>,&amp;number);<br><br> <span class="hljs-keyword">int</span> count=<span class="hljs-number">1</span>;<br><br> <span class="hljs-keyword">for</span>(<span class="hljs-keyword">int</span> i=<span class="hljs-number">0</span>;i&lt;number;i++)<br><br> &#123;<br><br> <span class="hljs-built_in">printf</span>(<span class="hljs-string">&quot;请输入第%d科的成绩和学分&quot;</span>,count); <br><br> <span class="hljs-built_in">scanf</span>(<span class="hljs-string">&quot;%f %f&quot;</span>,&amp;score,&amp;credit);<br><br> creditsum+=credit;<br><br><span class="hljs-comment">// printf(&quot;%.1f&quot;,(score/10-5)*credit);</span><br><br> gpasum+=(score/<span class="hljs-number">10</span><span class="hljs-number">-5</span>)*credit;<br><br> GPA=gpasum/creditsum;<br><br> count++;<br><br> &#125;<br><br><span class="hljs-comment">// printf(&quot;学分总和:%.1f&quot;,creditsum);</span><br><br><span class="hljs-comment">// printf(&quot;总分:%.1f&quot;,gpasum);</span><br><br> <span class="hljs-built_in">printf</span>(<span class="hljs-string">&quot;您的GPA是%.1f&quot;</span>,GPA);<br><br> <br><br>&#125; <br></code></pre></td></tr></table></figure>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="meta-keyword">include</span><span class="meta-string">&lt;stdio.h&gt;</span></span></span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">int</span> <span class="title">main</span><span class="params">()</span></span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">int</span> number;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">float</span> score;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">float</span> credit,creditsum=<span class="number">0</span>; </span><br><span class="line"></span><br><span class="line"> <span class="keyword">float</span> gpasum=<span class="number">0.0</span>,GPA=<span class="number">0.0</span>;</span><br><span class="line"></span><br><span class="line"> <span class="built_in">printf</span>(<span class="string">&quot;请输入需要计算的科目数量&quot;</span>);</span><br><span class="line"></span><br><span class="line"> <span class="built_in">scanf</span>(<span class="string">&quot;%d&quot;</span>,&amp;number);</span><br><span class="line"></span><br><span class="line"> <span class="keyword">int</span> count=<span class="number">1</span>;</span><br><span class="line"></span><br><span class="line"> <span class="keyword">for</span>(<span class="keyword">int</span> i=<span class="number">0</span>;i&lt;number;i++)</span><br><span class="line"></span><br><span class="line"> &#123;</span><br><span class="line"></span><br><span class="line"> <span class="built_in">printf</span>(<span class="string">&quot;请输入第%d科的成绩和学分&quot;</span>,count); </span><br><span class="line"></span><br><span class="line"> <span class="built_in">scanf</span>(<span class="string">&quot;%f %f&quot;</span>,&amp;score,&amp;credit);</span><br><span class="line"></span><br><span class="line"> creditsum+=credit;</span><br><span class="line"></span><br><span class="line"><span class="comment">// printf(&quot;%.1f&quot;,(score/10-5)*credit);</span></span><br><span class="line"></span><br><span class="line"> gpasum+=(score/<span class="number">10</span><span class="number">-5</span>)*credit;</span><br><span class="line"></span><br><span class="line"> GPA=gpasum/creditsum;</span><br><span class="line"></span><br><span class="line"> count++;</span><br><span class="line"></span><br><span class="line"> &#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">// printf(&quot;学分总和:%.1f&quot;,creditsum);</span></span><br><span class="line"></span><br><span class="line"><span class="comment">// printf(&quot;总分:%.1f&quot;,gpasum);</span></span><br><span class="line"></span><br><span class="line"> <span class="built_in">printf</span>(<span class="string">&quot;您的GPA是%.1f&quot;</span>,GPA);</span><br><span class="line"></span><br><span class="line"> </span><br><span class="line"></span><br><span class="line">&#125; </span><br></pre></td></tr></table></figure>

<p>功能样图<br><img src="https://img-blog.csdnimg.cn/20200520142248247.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3BqMjAwMjAzMTg=,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述"><br>欢迎关注微信公众号 :打码少年风萧<br>程序链接<br>链接:<a target="_blank" rel="noopener" href="https://pan.baidu.com/s/1MzkRQ3XCtWadlWFxFDef4g">https://pan.baidu.com/s/1MzkRQ3XCtWadlWFxFDef4g</a><br>提取码:30qf </p>

Expand Down
Loading

0 comments on commit 713b81b

Please sign in to comment.