Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
magic_square
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JangHyeongJun
magic_square
Commits
e33b80a7
Commit
e33b80a7
authored
4 years ago
by
JangHyeongJun
Browse files
Options
Downloads
Patches
Plain Diff
Update README.md
parent
3d27d1f6
Branches
master
No related tags found
No related merge requests found
Pipeline
#4901
failed
4 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+20
-24
20 additions, 24 deletions
README.md
with
20 additions
and
24 deletions
README.md
+
20
−
24
View file @
e33b80a7
<<<<<<< HEAD
#This is For Final Assignment for 창의소프트웨어입문(F031-1)
201320527 장형준
##magic_3x3.py
##magic_4x4.py
##magic_5x5.py
##magix_nxn.py
##multi_magix_4x4.py 로 구성되어있습니다.
###
magic_3x3.py에서는 사용자는 3x3 마방진을 만들 수 있습니다.
###magic_3x3.py
사용자는 3x3 마방진을 만들 수 있습니다.
계산복잡도는 O(n^n)입니다.
실행하고나면 9개의 숫자를 입력하라는 출력문구가 나오며, 숫자를 입력하면 그 숫자들로 만들 수 있는 마방진이 one2nine.txt 파일에 저장되고, stderr에 총 계산시간과, 몇개의 답을 찾았는지 출력하고 종료합니다.
실행하고나면 9개의 숫자를 입력하라는 출력문구가 나오며, 숫자를 입력하면 그 숫자들로 만들 수 있는 마방진이
<u>
one2nine.txt
</u>
파일에 저장되고, stderr에 총 계산시간과, 몇개의 답을 찾았는지 출력하고 종료합니다.
magic_4x4.py에서는 사용자는 4x4 마방진을 만들 수 있습니다.
###magic_4x4.py
사용자는 4x4 마방진을 만들 수 있습니다.
계산복잡도는 O(n^n)입니다.
실행하고나면 16개의 숫자를 입력하라는 출력문구가 나오며, 숫자를 입력하면 그 숫자들로 만들 수 있는 마방진이 4x4.txt 파일에 저장되고, stderr에 총 계산시간과, 몇개의 답을 찾았는지 출력하고 종료합니다.
실행하고나면 16개의 숫자를 입력하라는 출력문구가 나오며, 숫자를 입력하면 그 숫자들로 만들 수 있는 마방진이
<u>
4x4.txt
</u>
파일에 저장되고, stderr에 총 계산시간과, 몇개의 답을 찾았는지 출력하고 종료합니다.
부가적으로 사분면의 계산을 위한 함수외에 실제 마방진(사분면에 대한 계산 없이 마방진을 만듦)을 만들긴 했다만, 사분면마방진에 포함되는 내용이라 따로 출력양식을 만들어놓지 않았습니다.
만약 1~16까지의 입력을 한다면 예상 출력답은 3456개이며, 계산시간은 제 컴퓨터 기준 66.91초 입니다.
만약 1~16까지의 입력을 한다면 예상 출력답은 3456개이며, 계산시간은 제 컴퓨터 기준 60 ~ 64초 입니다.
###test_nxn.py
magic_3x3.py와 magic_4x4.py 의 결과 text파일을 이용합니다.
먼저 두개의 파이썬을 실행 완료한 후, 어떤것을 테스트할지 입력합니다.
####1을 입력하면 magic_3x3.py의 결과를 테스트합니다.
magic_5x5.py
####2를 입력하면 magic_4x4.py의 결과를 테스트합니다.
####magic_5x5.py
숫자가 늘어남에따라 기하급수적으로 증가하므로 기존의 방법으로는 너무 오랜시간이 들었습니다.
그리하여 만약 input이 연속된 숫자이고, 중복이 존재하지않는 경우를 가정하고 만들었던 5
*
5마방진입니다.
4x4마방진으로 바뀌기 전에 이미 작성하였는데 삭제하기 아까워서 함께 제출합니다.
...
...
@@ -28,16 +29,11 @@ magic_5x5.py
일단은 8개를 만들어놓고 더 만들떄의 케이스를 생각중이었습니다.
magix_nxn.py
####
magix_nxn.py
실패입니다.
multi_magix_4x4.py
####
multi_magix_4x4.py
파이썬은 단일 쓰레드를 사용합니다. 만약 멀티프로세싱을 이용하면 연산속도가 얼마나 빨라질 수 있을까 고민하며 만들어보려합니다. 아직 미완성입니다.
test_nxn.py
magic_3x3.py와 magic_4x4.py 의 결과 text파일을 이용합니다.
먼저 두개의 파이썬을 실행 완료한 후, 어떤것을 테스트할지 입력합니다.
1을 입력하면 magic_3x3.py의 결과를 테스트합니다.
2를 입력하면 magic_4x4.py의 결과를 테스트합니다.
=======
# magic_square
\ No newline at end of file
=================
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment