GithubHelp home page GithubHelp logo

junyi_interview's Introduction

Environments

Language

Python3.6

how to run

make sure you’ve install the python3.6. then you can just type the following commands

python solution1.py

Questions

第一題

第二題

第三題

基本上可以把題目想成用 truth table 來表達,今天看到三的袋子各有標籤,如下 然後我們可以來個排列組合一下實際袋子情況內容,來各字填上對或錯,再來繼續推論題目

實際情況只裝鉛筆只裝原子筆混合
鉛原混FFF
鉛混原FTT
原混鉛TTT
原鉛混TTF
混鉛原TTT
混原鉛TFT

實際只有這六種可能性(3!),那今天能夠符合題目所敘述的標籤全貼錯的狀況,只有表中我全為true的情況(true代表有符合標籤是錯的情況, false代表,標籤是對的,那就不符合題目要求)

兩種情況我挑選出來是下面這樣

  • 原混鉛
  • 混鉛原

基本上答案就是這樣了,當然也可以將這狀況來比對看看

那我們今天從混和的去挑,因為他標籤是錯的,所以代表他一定是只有鉛筆或原子筆,今天假設是鉛筆,那就是符合 原混鉛 這狀況,因為指裝原子筆只剩下混合的可能性了,要不然他標籤會是對的,無法符合題目敘述!

另外一個允許的狀況也可以套套看,一樣的意思最後都會符合題目的敘述。

第四題

今天可以將題目變成數學表達式

三人出的錢 = 餐點的錢 + 服務生暗摃的錢

900 = 900 + 0 => 這是一開始的

900 = 750 + 150 => 服務生發現可以退費150

900 = 750 + 60 + 90 => 服務生想要暗槓 60

900 - 90 = 750 + 60

3*(300-30) = 750 + 60

810 = 750 + 60 (90元已經被移出去這個等式了,等量公理兩邊相減)

所以今天題目敘述詭異的地方是, 270*3 卻又去加 60 想要等於 900 這段,因為今天出出去的錢總數已經變成 810元了。所以拿810去加60有點意義不明,是故意要錯誤引導。

junyi_interview's People

Contributors

sillygod avatar

Watchers

 avatar  avatar

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.