Coder Social home page Coder Social logo

Comments (4)

rhs0266 avatar rhs0266 commented on August 16, 2024

네 맞습니다. 무엇이 이상하신가요?

from fastcampus.

bangddong avatar bangddong commented on August 16, 2024

애매하게 질문드려 죄송합니다!

static void pro() {
// 사고 싶은 땅에서 시작해서 루트 땅까지 올라오면서 정답을 찾으면 편하다.
// 왜냐하면 부모 노드는 찾기 쉽기 때문이다.
while (Q-- > 0){
int x = scan.nextInt(), res = 0;
int y = x;
while (x) {
if (estate[x]) res = x;
x >>= 1;
}
estate[y] = 1;
sb.append(res).append('\n');
}
System.out.println(sb);
}

이 메소드 내부에서
while (x) 와 if (estate[x]) 부분이 이해가 안됩니다!
x도 int형이고 estate 또한 int 배열인데 조건문에 들어갈 수 있나요 ...?

java 문법적인 질문이라 혹시 몰라 IDE에 그대로 카피해도 오류가 발생합니다!

from fastcampus.

rhs0266 avatar rhs0266 commented on August 16, 2024

아 뭔가 코드에 조금의 누락이 있었네요 ㅜㅜ 죄송합니다. 바로 수정해드릴게요!

from fastcampus.

bangddong avatar bangddong commented on August 16, 2024

빠른 피드백 정말 감사드립니다!!!

from fastcampus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.