|
6 | 6 | <title>Best Divisor - √n約数列挙+桁和比較</title> |
7 | 7 |
|
8 | 8 | <!-- Tailwind CSS --> |
9 | | - <script src="https://cdn.tailwindcss.com"></script> |
| 9 | + <script src="https://cdn.tailwindcss.com" crossorigin="anonymous"></script> |
10 | 10 |
|
11 | 11 | <!-- Google Fonts --> |
12 | 12 | <link rel="preconnect" href="https://fonts.googleapis.com" /> |
|
20 | 20 | <link |
21 | 21 | href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css" |
22 | 22 | rel="stylesheet" |
| 23 | + integrity="sha512-vswe+cgvic/XBoF1OcM/TeJ2FW0OofqAVdCZiEYkd6dwGXthvkSFWOoGGJgS2CW70VK5dQM5Oh+7ne47s74VTg==" |
| 24 | + crossorigin="anonymous" |
23 | 25 | /> |
24 | 26 | <link |
25 | 27 | href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/line-numbers/prism-line-numbers.min.css" |
26 | 28 | rel="stylesheet" |
| 29 | + integrity="sha512-cbQXwDFK7lj2Fqfkuxbo5iD1dSbLlJGXGpfTDqbggqjHJeyzx88I3rfwjS38WJag/ihH7lzuGlGHpDBymLirZQ==" |
| 30 | + crossorigin="anonymous" |
27 | 31 | /> |
28 | 32 | <link |
29 | 33 | href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/toolbar/prism-toolbar.min.css" |
30 | 34 | rel="stylesheet" |
| 35 | + integrity="sha512-Dqf5696xtofgH089BgZJo2lSWTvev4GFo+gA2o4GullFY65rzQVQLQVlzLvYwTo0Bb2Gpb6IqwxYWtoMonfdhQ==" |
| 36 | + crossorigin="anonymous" |
31 | 37 | /> |
32 | 38 |
|
33 | 39 | <style> |
@@ -284,7 +290,12 @@ <h3 class="text-lg font-bold text-slate-700 mb-3">📖 フローチャートの |
284 | 290 | style="max-width: 100%; height: auto; color: #333" |
285 | 291 | role="img" |
286 | 292 | aria-label="Best Divisor flowchart" |
| 293 | + aria-describedby="flowchart-desc" |
287 | 294 | > |
| 295 | + <title>Best Divisor アルゴリズムのフローチャート</title> |
| 296 | + <desc id="flowchart-desc"> |
| 297 | + √n約数列挙アルゴリズムの処理フローを示す図。入力から約数列挙、桁和計算、最良約数選択までの9ステップを視覚化しています。 |
| 298 | + </desc> |
288 | 299 | <defs> |
289 | 300 | <!-- 矢印マーカー(大きめに調整) --> |
290 | 301 | <marker |
@@ -1203,11 +1214,31 @@ <h3 class="text-xl font-bold text-teal-800 mt-8 mb-3">具体例での計算量</ |
1203 | 1214 | <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script> |
1204 | 1215 |
|
1205 | 1216 | <!-- Prism.js --> |
1206 | | - <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"></script> |
1207 | | - <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-python.min.js"></script> |
1208 | | - <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/line-numbers/prism-line-numbers.min.js"></script> |
1209 | | - <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/toolbar/prism-toolbar.min.js"></script> |
1210 | | - <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js"></script> |
| 1217 | + <script |
| 1218 | + src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js" |
| 1219 | + integrity="sha512-7Z9J3l1+EYfeaPKcGXu3MS/7T+w19WtKQY/n+xzmw4hZhJ9tyYmcUS+4QqAlzhicE5LAfMQSF3iFTK9bQdTxXg==" |
| 1220 | + crossorigin="anonymous" |
| 1221 | + ></script> |
| 1222 | + <script |
| 1223 | + src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-python.min.js" |
| 1224 | + integrity="sha512-AKaNmg8COK0zEbjTdMHJAPJ0z6VeNqvRvH4mfRRWDO9CMxRqi0BlcjWXELn7AbfCvLsZ/SBv8kNEGZOJVdWRCQ==" |
| 1225 | + crossorigin="anonymous" |
| 1226 | + ></script> |
| 1227 | + <script |
| 1228 | + src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/line-numbers/prism-line-numbers.min.js" |
| 1229 | + integrity="sha512-BttltKXFyWnGZQcRWj6osIg7lbizJchuAMotOkdLxHxwt/Hyo+cl47bZU0QADg+Qt5DJwni3SbYGXeGMB5cBcw==" |
| 1230 | + crossorigin="anonymous" |
| 1231 | + ></script> |
| 1232 | + <script |
| 1233 | + src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/toolbar/prism-toolbar.min.js" |
| 1234 | + integrity="sha512-st608h+ZqzliahyzEpETxzU0f7z7a9acN6AFvYmHvpFhmcFuKT8a22TT5TpKpjDa3pt3Wv7Z3SdQBCBdDPhyWA==" |
| 1235 | + crossorigin="anonymous" |
| 1236 | + ></script> |
| 1237 | + <script |
| 1238 | + src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js" |
| 1239 | + integrity="sha512-/kVH1yrq7ajXhLpvjMxXJqPp6R9w7bqCjW5xhPjGAJTo9JTlx2NjQnM4+Q8dWmjJoMTaYVm7/ZqfqbWLGz+CIQ==" |
| 1240 | + crossorigin="anonymous" |
| 1241 | + ></script> |
1211 | 1242 |
|
1212 | 1243 | <!-- React Component --> |
1213 | 1244 | <script type="text/babel"> |
@@ -1340,7 +1371,7 @@ <h3 class="text-xl font-bold text-teal-800 mt-8 mb-3">具体例での計算量</ |
1340 | 1371 | > |
1341 | 1372 | <defs> |
1342 | 1373 | <marker |
1343 | | - id="arrow" |
| 1374 | + id="step-arrow" |
1344 | 1375 | markerWidth="10" |
1345 | 1376 | markerHeight="10" |
1346 | 1377 | refX="9" |
@@ -1976,7 +2007,7 @@ <h3 class="text-xl font-bold text-teal-800 mt-8 mb-3">具体例での計算量</ |
1976 | 2007 | stroke="#64748b" |
1977 | 2008 | strokeWidth="3" |
1978 | 2009 | fill="none" |
1979 | | - markerEnd="url(#arrow)" |
| 2010 | + markerEnd="url(#step-arrow)" |
1980 | 2011 | /> |
1981 | 2012 | <text |
1982 | 2013 | x="295" |
@@ -2100,7 +2131,7 @@ <h3 class="text-xl font-bold text-teal-800 mt-8 mb-3">具体例での計算量</ |
2100 | 2131 | return () => { |
2101 | 2132 | if (timerRef.current) clearTimeout(timerRef.current); |
2102 | 2133 | }; |
2103 | | - }, [isPlaying, activeStep]); |
| 2134 | + }, [isPlaying, activeStep, stepsData.length]); |
2104 | 2135 |
|
2105 | 2136 | const handlePlay = () => { |
2106 | 2137 | if (isPlaying) return; |
|
0 commit comments