Code Monkey home page Code Monkey logo

combinatorial-constraints-python's Introduction

Python Combinatorial Constrains Problem Solver

【問題】

要素として正の整数が入った循環リストを考えます。 循環リストXの全て の部分リストについてリスト内の全要素を合計し、 その合計値を集めた ものを集合N(X)とします。 引数 L に対し、 N(X) = {1,2,3,...,n(L)} を満たす長さLの循環リストX を出力するプログラムを作 成してください。 n(L)は長さLの循環リス トで作れる足し合わせの総パターン数で、 n(L) = L × (L - 1) +1 となりま

【実行方法】 本ディレクトリで下記コマンドを実行します。

$ python solver.py <list length>

実行後、解答が存在する場合はコンソールに解が出力されます。また解が存在しない 場合は、コンソールに解が存在しない旨のメッセージが出力されます。 引数 には解を求める循環リストの長さを非負整数値で入力して下さい。

【動作確認実行環境】

$ python --version
Python 2.7.5

combinatorial-constraints-python's People

Watchers

 avatar  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.