Skip to content

Latest commit

Β 

History

History
15 lines (12 loc) Β· 384 Bytes

File metadata and controls

15 lines (12 loc) Β· 384 Bytes

🚩 λ‹€μŒ μ½”λ“œ κ°„κ²°ν™” μ‹œν‚€κΈ° (κ³„μ‚°ν•œ μˆ«μžκ°€ 10얡이 λ„˜μ–΄κ°€λ©΄ 10μ–΅μœΌλ‘œ μΉ˜ν™˜ν•΄μ£ΌλŠ” μ½”λ“œ) 10μ–΅ : 1e9둜 ν‘œν˜„ν•  수 μžˆλ‹€.

long result = combis[i-1][j-1] + combis[i-1][j];
if (result > MAX)
    combis[i][j] = MAX;
else
    combis[i][j] = (int) result;
combis[i][j] = Math.min(combis[i-1][j-1] + combis[i-1][j], (int) 1e9);