-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3-seongwon030 #11
3-seongwon030 #11
Conversation
μ½λ λΈλμ pythonμ μ°μ λ€λ©΄ ```λ€μ pythonμ, c++μ μ°μ λ€λ©΄ ```λ€μ cppλ₯Ό λ£μΌλ©΄ μ½λ νμ΄λΌμ΄ν μ΄ λ€μ΄κ°λλ€! java, kotlin λ±λ± λ€ λμ΄μ! |
μ€μ€ λ§ν¬λ€μ΄μ μ΅μνμ§ μμμ λͺ°λμ΅λλ€ κ°μ¬ν©λλΉ λ€μμλ νμ΄λΌμ΄ν μ μ©ν΄μ μ¨λ³΄κ² μ΅λλ€!! |
μ¬λ €μ Έμλ PRλ μμ νκΈ°λ‘ λ°κΏ μ μμ΄μ. μ§κΈ ν΄!!!!!!!!!!! |
λ°λ‘ μμ νμ΅λλ·!! |
γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ γ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ νμ΄νΌ ν λ§ν λ₯Ό μν΄ λ¬λ €κ°λ΄ μλ€~!
# cnt 0μ΄λ©΄ | ||
# λͺ¨λ μ΅μ΄μκ±°λ -> flagλ False | ||
# μ΅μκ² μκ±°λ (무쑰건 0μ΄ νλλ μ‘΄μ¬) -> flagλ True | ||
if cnt == 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ λ λ§μ§λ§μ
if (allCheck && day > 0)
cout << day - 1;
else if (allCheck && day == 0)
cout << 0;
else
cout << -1;
μ΄λ°μμΌλ‘ λμμ λΉκ΅ν΄μ κΈΈμ΄λ₯Ό μ€μ¬λ³΄μμ΅λλΉ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ’νμ μ΅λκ°μ μ μ₯νκ³ λ§μ§λ§μ νμμ νκ΅°μ! μ λ λ€λ₯Έ μ κ·Όμ΄λΌ μ κΈ°νμ΅λλ€. κ·Έλλ νμμ 2κ°μ νλ₯Ό ν΅ν΄μ λ μ§λ₯Ό λ°κΏκ°λ©° νμνλκ° νμ λ Έλλ₯Ό {νμ μ¬λΆ, νμ λ μ§} μ΄λ° μμΌλ‘ λ§λ€μ΄ λ§μ§λ§ λ°°μ΄μ μννλ©° λ μ§ νμΈνλ μ½λλ₯Ό μμ¨ μ μμ κ² κ°μμ!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μμ΅μ ν λ§ν κ° μλ€λκ±Έ flagλ₯Ό ν΅ν΄ νλ³ν΄μ£Όμκ΅°μ μμ¦ ν λ§ν κ° λμΈμΈκ² κ°μΌλ
μ λ νλ¬κ°λ³΄κ² μ΅λλ€
π λ¬Έμ λ§ν¬
ν λ§ν
βοΈ μμλ μκ°
3μκ°
β¨ μλ μ½λ
첫λ²μ§Έ νμ΄
3μ°¨μ리μ€νΈ
λ‘ ν λ§ν μμΉ λ°κΈ°1μ΄ μλ€λ©΄ νμ ν΄λΉ μμΉλ₯Ό μ μ₯
0μΈ κ²½μ°μλ§ κ·Έ λ€μ μΉΈμΌλ‘ μ΄λ
0μ΄ μλ κ²½μ°μ trueλ‘ λ³ν
ans-1
μΆλ ₯λ¬Έμ μ
λ°νμ μλ¬κ° λ°μ !!
λλ²μ§Έ νμ΄
ν λ§ν κ° λͺ¨λ 0μΈ μν μ¦, μ΅μ§ μμ μνκ° μ‘΄μ¬νλ€λ κ²μ μμΈλ‘ λμ§ μμλ€.
λͺ¨λ μ΅μμν
orμ΅μ κ² νλλ μλ μν
π μλ‘κ² μκ²λ λ΄μ©
κΈ°μ‘΄ ν λ§ν μμ ν μ°¨μμ΄ λμ΄λ κ² μΈμλ μ°¨μ΄κ° μμλ€μ. κ·Όλ° λ무 λΉν¨μ¨μ μΌλ‘ νΌ κ² κ°μ΅λλ€. λ€μ ν λ² νμ΄λ΄μΌκ² λ€μ.