GithubHelp home page GithubHelp logo

google-io-extended-2017-shortcoding's Introduction

Rainist Google IO Extended 2017 Shortcoding Contest

팜플렛이 떨어져서 진행하는 이벤트가 절대 아닙니다.

참여방법

다음 문제를 Kotlin 으로 최대한 짧게 풀어 이 Repository에 Pull Request를 보내주시면 됩니다! (파일 크기가 작을 수록 짧은 코드로 간주합니다)

Pull Request 내용에 꼭 이메일 주소를 적어주셔야 기프티콘 발송이 가능하오니 꼭 기입 부탁드립니다! :D

제출 기한

행사 당일 자정까지 (~ 7/2 23:59)

문제

Cody's Jams

코디의 잼 가게 주인인 코디는 잼 할인 행사를 계획하고 있습니다. 간단하게 진행하기 위해, 모든 제품을 25% 할인하여 팔기로 결정했습니다. (정확하게 정가의 75% 가격) 파는 잼의 가격이 4의 배수이기 때문에, 할인된 가격 모두 정수 입니다.

할인 행사를 준비하기 위해 할인된 가격으로 새로운 가격표를 주문했습니다. 그리고 할인 행사가 끝났을 때 사용할 정가 가격표도 주문했습니다.

코디가 주문한 가격표를 확인했는데 불행히도, 할인된 가격, 정가가 합쳐지고, 정렬된 상태로 출력되었습니다. 심지어 가격표가 다 똑같이 생겨서 구분해 낼 수 없었습니다. 이걸 어떻게 구분해낼 수 있을까요?

예를 들어,

정가가 20, 80, 100 이었다면, 할인된 가격은 15, 60, 75이고, 가격표는 15, 20, 60, 75, 80, 100 순서로 출력됩니다.

문제는 Main.kt의 다음 함수를 채우는 방식으로 풀어주시면 됩니다.

fun solve(combinedList: List<Long>): List<Long>

Input

listOf(15, 20, 60, 75, 80, 100)
listOf(9, 9, 12, 12, 12, 15, 16, 20)

Output

listOf(15, 60, 75)
listOf(9, 9, 12, 15)

상품

  • 1등 : 스타벅스 자바칩 프라푸치노 기프티콘
  • 2등 : 스타벅스 캬라멜 마끼아또 기프티콘
  • 3등 : 스타벅스 아메리카노 기프티콘

문의 사항

  • Google I/O 2017 Extended Seoul 행사장 내의 레이니스트 부스로 방문해주세요!

google-io-extended-2017-shortcoding's People

Contributors

0xd669 avatar devholic avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

google-io-extended-2017-shortcoding's Issues

Int Overflow depending on calculation order

Following Testcase is the First Case that fails if multiplication comes before division:

listOf(270624780, 336144033, 360833040, 448192044, 736130808, 745857189, 981507744, 994476252) to listOf(270624780, 336144033, 736130808, 745857189),

More specifically, 736130808 * 4 exceeds Int representation limit

TestCase I/O Mismatch

Following is the First Case that I/O mismatch occurs:

listOf(16713, 22284, 26730, 35640, 35640, 47520, 47520, 63360) to listOf(16713, 26730, 35640),

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.