YEON PLANNING · 직관수학 (초6)

부피와 겉넓이 — 4단계 문제은행

영상으로 배우고 → 직접 풀고 → 답 제출 → 해설. 부피는 안에 담기는 공간, 겉넓이는 감싸는 껍질 — 완전히 다른 이야기.

✍️ 연플래닝 오리지널 — 「아하! 보이는 직관수학」 자체 제작. 모든 문제·정답 손검산 완료. 답안을 제출해야 해설·정답이 열립니다(먼저 스스로 풀어 보세요).

💬 더 필요한 게 있나요?

난이도 조절(더 쉽게 / 더 어렵게) · 다른 유형 · 특정 개념 집중 · 문항 수 등 무엇이든 적어 주세요. 선생님이 확인합니다. (공개 아님)
✏️ 손으로 풀어보세요
`; return s; } // ── 직육면체 (겨냥도) ── function box(cfg){ const {a=5, b=3, c=4, note='', H=215, U=17, hi=''} = cfg; const w=a*U, d=b*U*0.52, h=c*U; // 좌우 라벨('높이 n' ~46px / '세로 n' ~46px)이 잘리지 않게 여백 확보 + 폭 자동 계산 const ox=62, oy=H-62; const W = Math.max(250, ox + w + d + 62); const F=[[0,0],[w,0],[w,-h],[0,-h]]; // 앞면 const B=F.map(p=>[p[0]+d, p[1]-d]); // 뒷면 let s=``; const P=(pts,f,st,dash)=>``; s+=P(B,'#eef4f7',0,1); s+=``; s+=P([F[3],B[3],B[2],F[2]], hi==='윗면'?'#f7d5cd':'#dbe9f2',0,0); // 윗면 s+=P([F[1],B[1],B[2],F[2]], hi==='옆면'?'#f7d5cd':'#c3daea',0,0); // 오른쪽 옆면 s+=P(F, hi==='앞면'?'#f7d5cd':'#cfe2f3',0,0); // 앞면 s+=`가로 ${a}`; s+=`높이 ${c}`; s+=`세로 ${b}`; if(note) s+=`${note}`; s+=``; return s; } const P=[ { tier:'기초', type:'self', kind:'num', q:'가로 3, 세로 4, 높이 5 cm 인 직육면체의 부피는 몇 cm³ 일까요?', fig:box({a:3,b:4,c:5,note:'부피는?'}), answer:60, hint:'가로 × 세로 × 높이!', sol:{ ans:'60 cm³', fig:null, steps:['바닥에 1 cm³ 상자를 3 × 4 = 12개 깔아요.','5층 쌓으면 12 × 5 = 60개.','부피 = 가로 × 세로 × 높이 = 60 cm³.']}}, { tier:'기초', type:'self', kind:'num', q:'가로 2, 세로 3, 높이 6 cm 인 직육면체의 부피는 몇 cm³ 일까요?', fig:box({a:2,b:3,c:6,note:'부피는?'}), answer:36, hint:'가로 × 세로 × 높이!', sol:{ ans:'36 cm³', fig:null, steps:['바닥에 1 cm³ 상자를 2 × 3 = 6개 깔아요.','6층 쌓으면 6 × 6 = 36개.','부피 = 가로 × 세로 × 높이 = 36 cm³.']}}, { tier:'기초', type:'self', kind:'num', q:'가로 5, 세로 5, 높이 5 cm 인 직육면체의 부피는 몇 cm³ 일까요?', fig:box({a:5,b:5,c:5,note:'부피는?'}), answer:125, hint:'가로 × 세로 × 높이!', sol:{ ans:'125 cm³', fig:null, steps:['바닥에 1 cm³ 상자를 5 × 5 = 25개 깔아요.','5층 쌓으면 25 × 5 = 125개.','부피 = 가로 × 세로 × 높이 = 125 cm³.']}}, { tier:'기초', type:'self', kind:'num', q:'가로 4, 세로 2, 높이 7 cm 인 직육면체의 부피는 몇 cm³ 일까요?', fig:box({a:4,b:2,c:7,note:'부피는?'}), answer:56, hint:'가로 × 세로 × 높이!', sol:{ ans:'56 cm³', fig:null, steps:['바닥에 1 cm³ 상자를 4 × 2 = 8개 깔아요.','7층 쌓으면 8 × 7 = 56개.','부피 = 가로 × 세로 × 높이 = 56 cm³.']}}, { tier:'기초', type:'self', kind:'num', q:'가로 6, 세로 3, 높이 2 cm 인 직육면체의 부피는 몇 cm³ 일까요?', fig:box({a:6,b:3,c:2,note:'부피는?'}), answer:36, hint:'가로 × 세로 × 높이!', sol:{ ans:'36 cm³', fig:null, steps:['바닥에 1 cm³ 상자를 6 × 3 = 18개 깔아요.','2층 쌓으면 18 × 2 = 36개.','부피 = 가로 × 세로 × 높이 = 36 cm³.']}}, { tier:'기초', type:'self', kind:'num', q:'가로 8, 세로 2, 높이 3 cm 인 직육면체의 부피는 몇 cm³ 일까요?', fig:box({a:8,b:2,c:3,note:'부피는?'}), answer:48, hint:'가로 × 세로 × 높이!', sol:{ ans:'48 cm³', fig:null, steps:['바닥에 1 cm³ 상자를 8 × 2 = 16개 깔아요.','3층 쌓으면 16 × 3 = 48개.','부피 = 가로 × 세로 × 높이 = 48 cm³.']}}, { tier:'기초', type:'self', kind:'num', q:'가로 4, 세로 4, 높이 6 cm 인 직육면체의 부피는 몇 cm³ 일까요?', fig:box({a:4,b:4,c:6,note:'부피는?'}), answer:96, hint:'가로 × 세로 × 높이!', sol:{ ans:'96 cm³', fig:null, steps:['바닥에 1 cm³ 상자를 4 × 4 = 16개 깔아요.','6층 쌓으면 16 × 6 = 96개.','부피 = 가로 × 세로 × 높이 = 96 cm³.']}}, { tier:'기초', type:'self', kind:'num', q:'가로 10, 세로 3, 높이 2 cm 인 직육면체의 부피는 몇 cm³ 일까요?', fig:box({a:10,b:3,c:2,note:'부피는?'}), answer:60, hint:'가로 × 세로 × 높이!', sol:{ ans:'60 cm³', fig:null, steps:['바닥에 1 cm³ 상자를 10 × 3 = 30개 깔아요.','2층 쌓으면 30 × 2 = 60개.','부피 = 가로 × 세로 × 높이 = 60 cm³.']}}, { tier:'기초', type:'self', kind:'num', q:'가로 7, 세로 2, 높이 4 cm 인 직육면체의 부피는 몇 cm³ 일까요?', fig:box({a:7,b:2,c:4,note:'부피는?'}), answer:56, hint:'가로 × 세로 × 높이!', sol:{ ans:'56 cm³', fig:null, steps:['바닥에 1 cm³ 상자를 7 × 2 = 14개 깔아요.','4층 쌓으면 14 × 4 = 56개.','부피 = 가로 × 세로 × 높이 = 56 cm³.']}}, { tier:'기초', type:'self', kind:'num', q:'가로 3, 세로 3, 높이 9 cm 인 직육면체의 부피는 몇 cm³ 일까요?', fig:box({a:3,b:3,c:9,note:'부피는?'}), answer:81, hint:'가로 × 세로 × 높이!', sol:{ ans:'81 cm³', fig:null, steps:['바닥에 1 cm³ 상자를 3 × 3 = 9개 깔아요.','9층 쌓으면 9 × 9 = 81개.','부피 = 가로 × 세로 × 높이 = 81 cm³.']}}, { tier:'중급', type:'self', kind:'num', q:'가로 3, 세로 4, 높이 5 cm 인 직육면체의 겉넓이는 몇 cm² 일까요?', fig:box({a:3,b:4,c:5,note:'겉넓이(모든 면의 합)는?'}), answer:94, hint:'마주 보는 면끼리 같아요. 3종류만 구해서 × 2!', sol:{ ans:'94 cm²', fig:null, steps:['앞뒤 = 3 × 5 = 15, 좌우 = 4 × 5 = 20, 위아래 = 3 × 4 = 12.','(15 + 20 + 12) × 2 = 94 cm².','겉넓이 = 상자를 펼친 종이의 넓이! 마주 보는 면이 같아서 3종류면 충분해요.']}}, { tier:'중급', type:'self', kind:'num', q:'가로 2, 세로 3, 높이 6 cm 인 직육면체의 겉넓이는 몇 cm² 일까요?', fig:box({a:2,b:3,c:6,note:'겉넓이(모든 면의 합)는?'}), answer:72, hint:'마주 보는 면끼리 같아요. 3종류만 구해서 × 2!', sol:{ ans:'72 cm²', fig:null, steps:['앞뒤 = 2 × 6 = 12, 좌우 = 3 × 6 = 18, 위아래 = 2 × 3 = 6.','(12 + 18 + 6) × 2 = 72 cm².','겉넓이 = 상자를 펼친 종이의 넓이! 마주 보는 면이 같아서 3종류면 충분해요.']}}, { tier:'중급', type:'self', kind:'num', q:'가로 5, 세로 5, 높이 5 cm 인 직육면체의 겉넓이는 몇 cm² 일까요?', fig:box({a:5,b:5,c:5,note:'겉넓이(모든 면의 합)는?'}), answer:150, hint:'마주 보는 면끼리 같아요. 3종류만 구해서 × 2!', sol:{ ans:'150 cm²', fig:null, steps:['앞뒤 = 5 × 5 = 25, 좌우 = 5 × 5 = 25, 위아래 = 5 × 5 = 25.','(25 + 25 + 25) × 2 = 150 cm².','겉넓이 = 상자를 펼친 종이의 넓이! 마주 보는 면이 같아서 3종류면 충분해요.']}}, { tier:'중급', type:'self', kind:'num', q:'가로 4, 세로 2, 높이 7 cm 인 직육면체의 겉넓이는 몇 cm² 일까요?', fig:box({a:4,b:2,c:7,note:'겉넓이(모든 면의 합)는?'}), answer:100, hint:'마주 보는 면끼리 같아요. 3종류만 구해서 × 2!', sol:{ ans:'100 cm²', fig:null, steps:['앞뒤 = 4 × 7 = 28, 좌우 = 2 × 7 = 14, 위아래 = 4 × 2 = 8.','(28 + 14 + 8) × 2 = 100 cm².','겉넓이 = 상자를 펼친 종이의 넓이! 마주 보는 면이 같아서 3종류면 충분해요.']}}, { tier:'중급', type:'self', kind:'num', q:'가로 6, 세로 3, 높이 2 cm 인 직육면체의 겉넓이는 몇 cm² 일까요?', fig:box({a:6,b:3,c:2,note:'겉넓이(모든 면의 합)는?'}), answer:72, hint:'마주 보는 면끼리 같아요. 3종류만 구해서 × 2!', sol:{ ans:'72 cm²', fig:null, steps:['앞뒤 = 6 × 2 = 12, 좌우 = 3 × 2 = 6, 위아래 = 6 × 3 = 18.','(12 + 6 + 18) × 2 = 72 cm².','겉넓이 = 상자를 펼친 종이의 넓이! 마주 보는 면이 같아서 3종류면 충분해요.']}}, { tier:'중급', type:'self', kind:'num', q:'가로 8, 세로 2, 높이 3 cm 인 직육면체의 겉넓이는 몇 cm² 일까요?', fig:box({a:8,b:2,c:3,note:'겉넓이(모든 면의 합)는?'}), answer:92, hint:'마주 보는 면끼리 같아요. 3종류만 구해서 × 2!', sol:{ ans:'92 cm²', fig:null, steps:['앞뒤 = 8 × 3 = 24, 좌우 = 2 × 3 = 6, 위아래 = 8 × 2 = 16.','(24 + 6 + 16) × 2 = 92 cm².','겉넓이 = 상자를 펼친 종이의 넓이! 마주 보는 면이 같아서 3종류면 충분해요.']}}, { tier:'중급', type:'self', kind:'num', q:'가로 4, 세로 4, 높이 6 cm 인 직육면체의 겉넓이는 몇 cm² 일까요?', fig:box({a:4,b:4,c:6,note:'겉넓이(모든 면의 합)는?'}), answer:128, hint:'마주 보는 면끼리 같아요. 3종류만 구해서 × 2!', sol:{ ans:'128 cm²', fig:null, steps:['앞뒤 = 4 × 6 = 24, 좌우 = 4 × 6 = 24, 위아래 = 4 × 4 = 16.','(24 + 24 + 16) × 2 = 128 cm².','겉넓이 = 상자를 펼친 종이의 넓이! 마주 보는 면이 같아서 3종류면 충분해요.']}}, { tier:'중급', type:'self', kind:'num', q:'가로 10, 세로 3, 높이 2 cm 인 직육면체의 겉넓이는 몇 cm² 일까요?', fig:box({a:10,b:3,c:2,note:'겉넓이(모든 면의 합)는?'}), answer:112, hint:'마주 보는 면끼리 같아요. 3종류만 구해서 × 2!', sol:{ ans:'112 cm²', fig:null, steps:['앞뒤 = 10 × 2 = 20, 좌우 = 3 × 2 = 6, 위아래 = 10 × 3 = 30.','(20 + 6 + 30) × 2 = 112 cm².','겉넓이 = 상자를 펼친 종이의 넓이! 마주 보는 면이 같아서 3종류면 충분해요.']}}, { tier:'중급', type:'self', kind:'num', q:'가로 7, 세로 2, 높이 4 cm 인 직육면체의 겉넓이는 몇 cm² 일까요?', fig:box({a:7,b:2,c:4,note:'겉넓이(모든 면의 합)는?'}), answer:100, hint:'마주 보는 면끼리 같아요. 3종류만 구해서 × 2!', sol:{ ans:'100 cm²', fig:null, steps:['앞뒤 = 7 × 4 = 28, 좌우 = 2 × 4 = 8, 위아래 = 7 × 2 = 14.','(28 + 8 + 14) × 2 = 100 cm².','겉넓이 = 상자를 펼친 종이의 넓이! 마주 보는 면이 같아서 3종류면 충분해요.']}}, { tier:'중급', type:'self', kind:'num', q:'가로 3, 세로 3, 높이 9 cm 인 직육면체의 겉넓이는 몇 cm² 일까요?', fig:box({a:3,b:3,c:9,note:'겉넓이(모든 면의 합)는?'}), answer:126, hint:'마주 보는 면끼리 같아요. 3종류만 구해서 × 2!', sol:{ ans:'126 cm²', fig:null, steps:['앞뒤 = 3 × 9 = 27, 좌우 = 3 × 9 = 27, 위아래 = 3 × 3 = 9.','(27 + 27 + 9) × 2 = 126 cm².','겉넓이 = 상자를 펼친 종이의 넓이! 마주 보는 면이 같아서 3종류면 충분해요.']}}, { tier:'상위', type:'self', kind:'num', q:'부피 60 cm³, 가로 5, 세로 3 인 직육면체의 높이는?', fig:null, answer:4, hint:'5 × 3 × □ = 60', sol:{ ans:'4', fig:null, steps:['60 = 5 × 3 × 높이 = 15 × 높이.','높이 = 60 ÷ 15 = 4 cm.']}}, { tier:'상위', type:'self', kind:'num', q:'부피 64 cm³ 인 정육면체의 한 모서리는?', fig:null, answer:4, hint:'□ × □ × □ = 64', sol:{ ans:'4', fig:null, steps:['정육면체는 세 모서리가 같아요.','4 × 4 × 4 = 64.','한 모서리 = 4 cm.']}}, { tier:'상위', type:'self', kind:'num', q:'한 모서리 5 cm 인 정육면체의 겉넓이는?', fig:null, answer:150, hint:'면 하나 5×5. 면이 6개!', sol:{ ans:'150', fig:null, steps:['면 하나 = 5 × 5 = 25 cm².','면이 6개 → 25 × 6 = 150 cm².','정육면체 겉넓이 = 한 면 × 6!']}}, { tier:'상위', type:'self', kind:'num', q:'한 모서리 5 cm 인 정육면체의 부피는?', fig:null, answer:125, hint:'5 × 5 × 5 = ?', sol:{ ans:'125', fig:null, steps:['5 × 5 × 5 = 125 cm³.','같은 수를 세 번 곱해요.','겉넓이 150, 부피 125 — 다른 값이에요!']}}, { tier:'상위', type:'self', kind:'num', q:'1 L 는 몇 cm³ 일까요?', fig:null, answer:1000, hint:'1 L = 1000 mL, 1 mL = 1 cm³!', sol:{ ans:'1000', fig:null, steps:['1 L = 1000 mL.','1 mL = 1 cm³.','그래서 1 L = 1000 cm³. (한 모서리 10 cm 인 정육면체!)']}}, { tier:'상위', type:'self', kind:'num', q:'가로 20, 세로 10, 높이 5 cm 인 수조에 물을 가득 채우면 몇 L 일까요?', fig:null, answer:1, hint:'부피는 1000 cm³. L 로 바꾸면?', sol:{ ans:'1', fig:null, steps:['부피 = 20 × 10 × 5 = 1000 cm³.','1000 cm³ = 1 L.','물의 부피 = 그릇의 부피!']}}, { tier:'상위', type:'self', kind:'num', q:'모든 모서리를 2배로 하면 부피는 몇 배?', fig:null, answer:8, hint:'2 × 2 × 2 = ?', sol:{ ans:'8', fig:null, steps:['부피 = 가로 × 세로 × 높이. 셋 다 2배.','2 × 2 × 2 = 8배.','길이 2배 → 넓이 4배 → 부피 8배!']}}, { tier:'상위', type:'self', kind:'num', q:'모든 모서리를 2배로 하면 겉넓이는 몇 배?', fig:null, answer:4, hint:'면 하나가 2 × 2 = 4배!', sol:{ ans:'4', fig:null, steps:['겉넓이 = 면들의 넓이 합.','면 하나가 2 × 2 = 4배.','면 개수는 그대로니 겉넓이도 4배.']}}, { tier:'상위', type:'self', kind:'num', q:'모든 모서리를 3배로 하면 부피는 몇 배?', fig:null, answer:27, hint:'3 × 3 × 3 = ?', sol:{ ans:'27', fig:null, steps:['3 × 3 × 3 = 27배.','길이 3배 → 넓이 9배 → 부피 27배.','차원이 하나 늘 때마다 곱하는 횟수가 늘어요!']}}, { tier:'상위', type:'self', kind:'choice', q:'부피가 같아도 겉넓이가 다를 수 있을까요?', fig:null, choices:['있다','없다','정육면체만','알 수 없다'], answer:'있다', hint:'1×1×8 과 2×2×2 — 부피는 둘 다 8이에요!', sol:{ ans:'있다', fig:null, steps:['1×1×8: 부피 8, 겉넓이 = 2(1 + 8 + 8) = 34 cm².','2×2×2: 부피 8, 겉넓이 = 2(4 + 4 + 4) = 24 cm².','부피는 같은데 겉넓이가 달라요! 길쭉할수록 겉이 커지고, 정육면체에 가까울수록 겉이 작아요.']}}, { tier:'최상위', type:'self', kind:'num', q:'부피 8 cm³ 인 직육면체 중 겉넓이가 가장 작은 것의 겉넓이는?', fig:null, answer:24, hint:'정육면체에 가까울수록 겉이 작아요. 2×2×2!', sol:{ ans:'24', fig:null, steps:['부피 8이 되는 경우: 1×1×8(겉 34), 1×2×4(겉 28), 2×2×2(겉 24).','가장 작은 건 2×2×2 정육면체 → 24 cm².','같은 부피면 정육면체일 때 겉넓이가 가장 작아요! 그래서 상자를 정육면체에 가깝게 만들면 종이가 덜 들어요.']}}, { tier:'최상위', type:'self', kind:'choice', q:'같은 부피에서 겉넓이가 작으면 무엇이 유리할까요?', fig:null, choices:['포장지가 적게 든다','물이 많이 담긴다','무거워진다','알 수 없다'], answer:'포장지가 적게 든다', hint:'겉넓이 = 상자를 감싸는 종이의 넓이!', sol:{ ans:'포장지가 적게 든다', fig:null, steps:['겉넓이 = 상자를 감싸는 종이의 넓이.','겉넓이가 작으면 종이가 적게 들어요.','그래서 택배 상자를 정육면체에 가깝게 만들면 재료가 절약돼요!']}}, { tier:'최상위', type:'self', kind:'choice', q:'동물이 추운 곳에서 둥글둥글해지는 이유를 수학으로 말하면?', fig:null, choices:['겉넓이가 작아 열을 덜 뺏겨서','부피가 커져서','무거워서','알 수 없다'], answer:'겉넓이가 작아 열을 덜 뺏겨서', hint:'몸에서 열이 빠져나가는 곳은 겉면이에요!', sol:{ ans:'겉넓이가 작아 열을 덜 뺏겨서', fig:null, steps:['열은 몸의 겉면을 통해 빠져나가요.','같은 부피면 둥글수록 겉넓이가 작아요 (구가 가장 작아요).','겉넓이가 작으면 열을 덜 뺏겨요! 그래서 추운 곳 동물은 둥글둥글해요.']}}, { tier:'최상위', type:'self', kind:'choice', q:'직육면체를 반으로 자르면 겉넓이는 어떻게 될까요?', fig:null, choices:['늘어난다','줄어든다','그대로다','알 수 없다'], answer:'늘어난다', hint:'자른 자리에 새 면이 2개 생겨요!', sol:{ ans:'늘어난다', fig:null, steps:['자르면 부피의 합은 그대로예요.','하지만 자른 자리에 새로운 면이 2개 생겨요.','그래서 겉넓이는 늘어나요! 잘게 쪼갤수록 겉넓이가 커져요.']}}, { tier:'최상위', type:'self', kind:'num', q:'가로 4, 세로 3, 높이 2 인 수조에 물을 절반 채우면 물의 부피는?', fig:null, answer:12, hint:'전체 부피 24의 절반!', sol:{ ans:'12', fig:null, steps:['전체 부피 = 4 × 3 × 2 = 24 cm³.','절반 = 24 ÷ 2 = 12 cm³.','(또는 높이만 1 cm 로 보고 4 × 3 × 1 = 12 — 같은 답이죠!)']}}, { tier:'최상위', type:'self', kind:'num', q:'부피 24 cm³ 인 물을 가로 4, 세로 3 인 그릇에 부으면 물 높이는?', fig:null, answer:2, hint:'4 × 3 × □ = 24', sol:{ ans:'2', fig:null, steps:['24 = 4 × 3 × 높이 = 12 × 높이.','높이 = 24 ÷ 12 = 2 cm.','물의 부피를 알면 높이를 거꾸로 구할 수 있어요!']}}, { tier:'최상위', type:'self', kind:'num', q:'겉넓이 54 cm² 인 정육면체의 한 모서리는?', fig:null, answer:3, hint:'면 하나 = 54 ÷ 6 = 9 cm². □ × □ = 9 인 □는?', sol:{ ans:'3', fig:null, steps:['정육면체의 면은 6개 → 면 하나 = 54 ÷ 6 = 9 cm².','면 하나 = 한 모서리 × 한 모서리 = 9 → 3 × 3 = 9.','한 모서리 = 3 cm.']}}, { tier:'최상위', type:'self', kind:'num', q:'겉넓이 54 cm² 인 정육면체의 부피는?', fig:null, answer:27, hint:'한 모서리는 3 cm 예요!', sol:{ ans:'27', fig:null, steps:['면 하나 = 54 ÷ 6 = 9 → 한 모서리 = 3 cm.','부피 = 3 × 3 × 3 = 27 cm³.','겉넓이에서 모서리를 찾고, 그걸로 부피를 구했어요 — 두 단계로 푸는 문제!']}}, { tier:'최상위', type:'self', kind:'num', q:'1 m³ 짜리 상자에 1 cm³ 짜리 주사위를 몇 개 넣을 수 있을까요?', fig:null, answer:1000000, hint:'1 m = 100 cm. 100 × 100 × 100 = ?', sol:{ ans:'1000000', fig:null, steps:['1 m³ = 100 cm × 100 cm × 100 cm.','100 × 100 × 100 = 1000000개 (백만!).','길이는 100배인데 부피는 100만 배 — 단위가 커지면 어마어마해져요!']}}, { tier:'최상위', type:'self', kind:'choice', q:'부피와 겉넓이 중 물을 얼마나 담나와 관련된 것은?', fig:null, choices:['부피','겉넓이','둘 다','알 수 없다'], answer:'부피', hint:'그릇에 물을 채울 때 중요한 건 안쪽 공간일까요, 바깥 껍질일까요?', sol:{ ans:'부피', fig:null, steps:['부피 = 안에 얼마나 담기나 (공간의 크기).','겉넓이 = 겉을 감싸는 껍질의 넓이.','물을 담는 건 부피! 포장지는 겉넓이 — 둘은 완전히 다른 이야기예요.']}}, ]; const TIERS=['기초','중급','상위','최상위']; const TIER_DESC={기초:'영상만 봐도 바로 풀려요 — 배운 걸 그대로 적용.',중급:'한 번 더 생각 — 거꾸로·변형. 영상 안에 답이 있어요.',상위:'아래 학년 개념(선수 단원)을 함께 써야 풀려요.',최상위:'여러 개념·역발상·함정까지. 최고 난도.'}; let curTier='기초'; function tierProblems(t){ return P.map((p,i)=>({p,i})).filter(o=>o.p.tier===t); } function renderTabs(){ const tb=document.getElementById('tabs'); tb.innerHTML=''; TIERS.forEach(t=>{ const n=tierProblems(t).length; const b=document.createElement('button'); b.className='tab'+(t===curTier?' on':''); b.textContent=`${t} (${n})`; b.onclick=()=>{curTier=t; renderTabs(); renderList();}; tb.appendChild(b); }); document.getElementById('tierNote').textContent=TIER_DESC[curTier]; } function esc(x){return String(x).replace(/&/g,'&').replace(//g,'>');} function renderList(){ const L=document.getElementById('list'); L.innerHTML=''; const items=tierProblems(curTier); if(!items.length){ L.innerHTML='
이 난도는 곧 채워집니다 — 파일럿은 기초·중급·상위 예시.
'; return; } items.forEach(({p,i},k)=>{ const badge = p.type==='video' ? '🎬 영상해설' : '✍ 텍스트해설'; const pre = p.prereq ? `🔗 ${p.prereq.name}` : ''; const c=document.createElement('div'); c.className='card'; c.id='card'+i; let ansUI = p.kind==='choice' ? `
`+p.choices.map(o=>``).join('')+`
` : `
← 내 답을 쓰고 제출
`; c.innerHTML=`
${curTier} · 문제 ${k+1} ${badge} ${pre}
${mfx(p.q)}
${p.fig?`
${p.fig}
`:''} ${ansUI}
🔒 답을 제출해야 해설·정답이 열려요.
💡 힌트 — ${p.hint}
`; L.appendChild(c); }); } const picked={}; // 분수 답 입력 지원: '3/4', '1 1/2', '0.75' 모두 인식 function parseAns(v){ v=String(v).trim().replace(/\s+/g,' '); let m=/^(-?\d+)\s+(\d+)\/(\d+)$/.exec(v); if(m){ const s=(+m[1])<0?-1:1; return s*(Math.abs(+m[1])+(+m[2])/(+m[3])); } m=/^(-?\d+)\/(-?\d+)$/.exec(v); if(m) return (+m[1])/(+m[2]); return parseFloat(v.replace(/[^0-9.\-]/g,'')); } function pick(i,val,el){ picked[i]=val; document.querySelectorAll('#ch'+i+' button').forEach(b=>b.classList.remove('sel')); el.classList.add('sel'); } function mfx(t){ if(!window.mathToHTML) return t; // HTML 태그( 등)는 그대로 두고, 태그 사이 텍스트만 교과서식 수식으로 변환 return String(t).split(/(<[^>]+>)/).map(s=> s.charAt(0)==='<' ? s : mathToHTML(s)).join(''); } function submit(i){ const p=P[i]; let mine; if(p.kind==='choice'){ mine=picked[i]; if(mine==null){ alert('보기 중 하나를 먼저 고르세요.'); return; } } else { const v=document.getElementById('in'+i).value.trim(); if(v===''){ alert('답을 먼저 입력하세요.'); return; } mine=parseAns(v); if(isNaN(mine)){ alert('숫자나 분수(예: 3/4)로 입력해 주세요.'); return; } } const correct = p.kind==='choice' ? (mine===p.answer) : (Math.abs(mine-p.answer)<1e-6); const vd=document.getElementById('vd'+i); vd.classList.remove('hide'); document.getElementById('lock'+i).classList.add('hide'); document.getElementById('show'+i).classList.remove('hide'); // 제출했으니 해설 열람 가능 if(correct){ vd.className='verdict ok'; vd.innerHTML='✅ 정답이에요! 잘했어요.'; reveal(i); } else{ vd.className='verdict no'; vd.innerHTML='❌ 아쉬워요. 힌트를 보고 다시 풀어 볼까요? (해설도 열렸어요)'; document.getElementById('hint'+i).classList.remove('hide'); } } function reveal(i){ const p=P[i], sol=document.getElementById('sol'+i); sol.classList.remove('hide'); let steps=p.sol.steps.map(s=>`
• ${mfx(s)}
`).join(''); let pre=p.prereq?`
🔗 이 문제는 ${p.prereq.name} 개념이 필요해요 — 그 단원 보러 가기 →
`:''; let vsol = p.type==='video' ? `🎬 이 문제 영상 해설 보기 (짧게)` : ''; sol.innerHTML=`

📝 해설

${pre}${p.sol.fig?`
${p.sol.fig}
`:''}${steps}
정답: ${mfx(p.sol.ans)}
${vsol}` +`
🙋 이 해설이 어렵거나 더 자세히 알고 싶으면 말씀해주세요 — 상세 해설지를 새로 만들어 보내드릴게요.
` +``; } /* ───────── "이 해설도 어려워요" 체크 → 하단 요청 코너로 모으기 ───────── */ const hardSet=new Set(); function toggleHard(i,on){ on?hardSet.add(i):hardSet.delete(i); syncHard(); } function syncHard(){ const box=document.getElementById('hardList'); if(!box) return; if(!hardSet.size){ box.style.display='none'; box.textContent=''; return; } const names=[...hardSet].sort((a,b)=>a-b).map(i=>{ const list=tierProblems(P[i].tier); const k=list.findIndex(o=>o.i===i); return `${P[i].tier} ${k+1}번`; }); box.style.display='block'; box.innerHTML='🙋 해설이 어렵다고 표시한 문제: '+names.join(', ')+' — 보내기를 누르면 함께 전달돼요.'; } /* ───────── 추가요청 보내기 (선생님 확인용 · 이 기기에 저장) ───────── */ function reqKey(){ return 'pbreq:'+location.pathname; } function loadReq(){ try{ return JSON.parse(localStorage.getItem(reqKey())||'[]'); }catch(e){ return []; } } function nowStr(){ const d=new Date(), p=n=>(n<10?'0':'')+n; return d.getFullYear()+'-'+p(d.getMonth()+1)+'-'+p(d.getDate())+' '+p(d.getHours())+':'+p(d.getMinutes()); } function sendReq(){ const ta=document.getElementById('reqText'), note=document.getElementById('reqNote'); const text=(ta.value||'').trim(); const hard=[...hardSet].sort((a,b)=>a-b).map(i=>{ const list=tierProblems(P[i].tier); const k=list.findIndex(o=>o.i===i); return `${P[i].tier} ${k+1}번`; }); if(!text && !hard.length){ note.style.color='#C0503D'; note.textContent='요청 내용을 적거나, 어려운 해설을 체크해 주세요.'; return; } const arr=loadReq(); arr.push({ date:nowStr(), text, hard, unit:'초6 부피와 겉넓이' }); try{ localStorage.setItem(reqKey(), JSON.stringify(arr)); }catch(e){} ta.value=''; hardSet.clear(); syncHard(); document.querySelectorAll('.retag input').forEach(c=>c.checked=false); note.style.color='#2c8a55'; note.textContent='✅ 보냈어요! 선생님이 확인합니다. (이 기기에 저장됨)'; renderReq(); } function renderReq(){ const box=document.getElementById('reqMine'); if(!box) return; const arr=loadReq(); box.innerHTML=''; if(!arr.length) return; box.innerHTML='
📒 내가 보낸 요청 ('+arr.length+')
' + arr.slice().reverse().map(it=>`
${it.hard&&it.hard.length?'🙋 어려운 해설: '+it.hard.join(', ')+'
':''}${(it.text||'').replace(/(내용 없음)'}
${it.date}
`).join(''); } /* ───────── 인쇄 2모드 — 절약 인쇄(2단·컬러 유지) ───────── */ function ecoPrint(){ document.body.classList.add('eco-print'); window.addEventListener('afterprint', function h(){ document.body.classList.remove('eco-print'); window.removeEventListener('afterprint',h); }); window.print(); } /* ───────── DrawBoard (문항별 손으로 풀기 — 화면 가득 전체화면) ───────── */ const canvas=document.getElementById('drawCanvas'), ctx=canvas.getContext('2d'); const drawOverlay=document.getElementById('drawOverlay'), drawWrap=document.getElementById('drawCanvasWrap'); let drawOn=false, tool='pen', dsize=6, dcolor='#1f2a2a', drawing=false, last=null, currentDrawQ=null; const drawings={}; // i -> dataURL (문항별 손풀이) const photos={}; // i -> dataURL (문항별 사진) function sizeCanvas(restore){ const rect=drawWrap.getBoundingClientRect(), dpr=window.devicePixelRatio||1; canvas.width=Math.round(rect.width*dpr); canvas.height=Math.round(rect.height*dpr); canvas.style.width=rect.width+'px'; canvas.style.height=rect.height+'px'; ctx.setTransform(dpr,0,0,dpr,0,0); ctx.clearRect(0,0,rect.width,rect.height); if(restore){ const img=new Image(); img.onload=()=>ctx.drawImage(img,0,0,rect.width,rect.height); img.src=restore; } } window.addEventListener('resize',()=>{ if(drawOn) sizeCanvas(drawings[currentDrawQ]); }); window.openDraw=function(i){ drawOn=true; currentDrawQ=i; const plain=String(P[i].q).replace(/<[^>]*>/g,''); document.getElementById('drawQref').textContent=P[i].tier+' · '+plain.slice(0,30)+'…'; drawOverlay.classList.add('on'); sizeCanvas(drawings[i]); const el2=document.documentElement, req=el2.requestFullscreen||el2.webkitRequestFullscreen||el2.msRequestFullscreen; if(req){ try{ req.call(el2).catch(()=>{}); }catch(e){} } }; window.closeDraw=function(){ if(currentDrawQ!=null){ const hasInk=(()=>{ const d=ctx.getImageData(0,0,canvas.width,canvas.height).data; for(let k=3;k0) return true; return false; })(); if(hasInk){ drawings[currentDrawQ]=canvas.toDataURL('image/png'); renderThumbs(currentDrawQ); } } drawOn=false; currentDrawQ=null; drawOverlay.classList.remove('on'); if(document.fullscreenElement||document.webkitFullscreenElement){ (document.exitFullscreen||document.webkitExitFullscreen).call(document).catch(()=>{}); } }; window.submitFromDraw=function(){ const i=currentDrawQ; closeDraw(); if(i!=null) submit(i); }; document.addEventListener('fullscreenchange',()=>{ if(!document.fullscreenElement && drawOn) closeDraw(); }); window.setTool=t=>{ tool=t; document.getElementById('toolPen').classList.toggle('on',t==='pen'); document.getElementById('toolErase').classList.toggle('on',t==='erase'); }; window.setSize=s=>{ dsize=s; ['szS','szM','szL'].forEach(id=>document.getElementById(id).classList.remove('on')); document.getElementById(s===3?'szS':s===12?'szL':'szM').classList.add('on'); }; window.setColor=c=>{ dcolor=c; }; window.clearDraw=()=>{ if(confirm('그린 것을 모두 지울까요?')) ctx.clearRect(0,0,canvas.width,canvas.height); }; function dpos(e){ const r=canvas.getBoundingClientRect(), t=e.touches?e.touches[0]:e; return [t.clientX-r.left, t.clientY-r.top]; } function dstart(e){ if(!drawOn) return; e.preventDefault(); drawing=true; last=dpos(e); } function dmove(e){ if(!drawOn||!drawing) return; e.preventDefault(); const p=dpos(e); ctx.lineCap='round'; ctx.lineJoin='round'; if(tool==='erase'){ ctx.globalCompositeOperation='destination-out'; ctx.lineWidth=dsize*4; } else{ ctx.globalCompositeOperation='source-over'; ctx.strokeStyle=dcolor; ctx.lineWidth=dsize; } ctx.beginPath(); ctx.moveTo(last[0],last[1]); ctx.lineTo(p[0],p[1]); ctx.stroke(); last=p; } function dend(){ drawing=false; } canvas.addEventListener('mousedown',dstart); canvas.addEventListener('mousemove',dmove); window.addEventListener('mouseup',dend); canvas.addEventListener('touchstart',dstart,{passive:false}); canvas.addEventListener('touchmove',dmove,{passive:false}); canvas.addEventListener('touchend',dend,{passive:false}); /* ───────── 사진으로 올리기 (문항별) ───────── */ window.onPhoto=function(i,inputEl){ const file=inputEl.files&&inputEl.files[0]; if(!file) return; const reader=new FileReader(); reader.onload=ev=>{ const img=new Image(); img.onload=()=>{ const maxW=900, sc=Math.min(1,maxW/img.width), w=Math.round(img.width*sc), h=Math.round(img.height*sc); const cv=document.createElement('canvas'); cv.width=w; cv.height=h; cv.getContext('2d').drawImage(img,0,0,w,h); photos[i]=cv.toDataURL('image/jpeg',0.6); renderThumbs(i); }; img.src=ev.target.result; }; reader.readAsDataURL(file); inputEl.value=''; }; window.removePhoto=function(i){ delete photos[i]; renderThumbs(i); }; window.removeDrawing=function(i){ delete drawings[i]; renderThumbs(i); }; function renderThumbs(i){ const box=document.getElementById('thumbs'+i); if(!box) return; let h=''; if(drawings[i]) h+=`
손풀이
`; if(photos[i]) h+=`
사진
`; box.innerHTML=h; const db=document.getElementById('drawBtn'+i), pb=document.getElementById('photoBtn'+i); if(db) db.classList.toggle('has', !!drawings[i]); if(pb) pb.classList.toggle('has', !!photos[i]); } // 탭을 바꿔 다시 그려도 그 문항의 손풀이·사진 썸네일이 되살아나게 const _renderList=renderList; renderList=function(){ _renderList(); tierProblems(curTier).forEach(({p,i})=>renderThumbs(i)); }; renderTabs(); renderList(); renderReq();
✍️ 이제 문제로 굳히기 — 각 10문항
기초 10 중급 10 상급 10 최상위 10