From b7215be88c5ddfe4d2454f7d366bf4b2a952df2e Mon Sep 17 00:00:00 2001 From: Raphael McSinyx Date: Sat, 21 Jan 2017 21:34:57 +0700 Subject: others/153x: rm 030.py (inaccurate algorithm) and add 035.py --- others/153x/030.py | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100755 others/153x/030.py (limited to 'others/153x/030.py') diff --git a/others/153x/030.py b/others/153x/030.py deleted file mode 100755 index f08d0d0..0000000 --- a/others/153x/030.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python3 - -with open("CUT.INP") as f: - m, n = map(int, f.readline().split()) - -squares = [] -while m - n: - if m > n: - m -= n - squares.append("{} 1 {}\n".format(m + 1, n)) - else: - n -= m - squares.append("1 {} {}\n".format(n + 1, m)) -squares.append("1 1 {}\n".format(m)) - -with open("CUT.OUT", "w") as f: - f.write("{}\n".format(len(squares))) - for i in squares: - f.write(i) -- cgit 1.4.1