Giter Site home page Giter Site logo

factorization's Introduction

Hi there πŸ‘‹

Thank you for visiting my repositories

🌱 I was learning a lot in 42 Seoul (2020-01-20 ~ 2021-03-10)

🧐 I was learning iOS in Boostcamp (2020-07-27 ~ 2020-12-21)

πŸ“« 42 Intra ID: dochoi

πŸ–Œ My skills

πŸ”΄ C, C++, Python, Swift

πŸ€” Interested.

πŸ”΅ iOS

⚑ My blog : https://demian-develop.tistory.com/

factorization's People

Contributors

dochoi-bot avatar

Watchers

 avatar

factorization's Issues

check λ°°μ—΄ μ‚¬μš©μ΄μœ μ— λŒ€ν•œ 질문

check 배열을 λ§Œλ“œμ‹  μ΄μœ κ°€ μ†Œμˆ˜μΈ κ²½μš°μ—λ§Œ 체크λ₯Ό ν•˜λ €κ³  ν•˜μ‹  것 κ°™μŠ΅λ‹ˆλ‹€. 그런데 μ½”λ“œ 123μ€„λΆ€ν„°μ˜
while (n % i == 0) n /= i;
이 뢀뢄을 보면 이미 μž‘μ€ μ†Œμˆ˜λ“€λ‘œ λ‚˜λˆ΄κΈ° λ•Œλ¬Έμ— 120μ€„μ˜
if (check[i] == 0 && n % i == 0)
μ΄λΆ€λΆ„μ—μ„œμ˜ check[i] == 0 을 μ§€μ›Œλ„ λ˜‘κ°™μ΄ μž‘λ™λ  것 κ°™μ•„ 질문 λ“œλ¦½λ‹ˆλ‹€.

check 배열을 unsigned char둜 λ§Œλ“  μ΄μœ κ°€ μžˆλ‚˜μš”?

일반적으둜 unsigned charλŠ” ν‘œν˜„ λ²”μœ„κ°€ 0~255μ΄μ§€λ§Œ, μ•„μŠ€ν‚€ λ¬Έμžκ°€ μ•„λ‹Œ λ¬Έμžλ“€μ„ λ‹€λ£°λ•Œ 주둜 μ‚¬μš©ν•œλ‹€κ³  μ•Œκ³  μžˆμŠ΅λ‹ˆλ‹€! ν˜Ήμ‹œ check 배열을 unsigned char둜 λ§Œλ“œμ‹  μ΄μœ κ°€ μžˆλ‚˜μš”??

make λͺ…λ Ήμ–΄ μ‹€ν–‰μ‹œ warning λ°œμƒ

make λͺ…λ Ήμ–΄λ₯Ό μ‚¬μš©ν•  μ‹œ λ‹€μŒκ³Ό 같은 warning이 λ‚©λ‹ˆλ‹€. κ°œλ°œν™˜κ²½μ€ MacOSμž…λ‹ˆλ‹€.

./factorization.c:169:20: warning: passing 'unsigned char [65536]' to parameter
      of type 'char *' converts between pointers to integer types with different
      sign [-Wpointer-sign]
        find_prime_number(check, sqrt_number(number), number);
                          ^~~~~
./factorization.c:111:30: note: passing argument to parameter 'check' here
void    find_prime_number(char *check, unsigned int n_sqrt, unsigned int n)
                                ^
1 warning generated.
complete

νƒ€μž… κ΄€λ ¨ν•΄ warning이 λ‚˜λŠ” 것 같은데 ν•¨μˆ˜ μ„ μ–Έν•  λ•Œ λ§€κ°œλ³€μˆ˜ νƒ€μž…μ„ μˆ˜μ •ν•˜μ‹œκ±°λ‚˜ gcc μ˜΅μ…˜μ„ μ œκ±°ν•˜λ©΄ ν•΄κ²°ν•  수 μžˆμ„ 것 κ°™μŠ΅λ‹ˆλ‹€.

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.