diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/2a.py | 12 | ||||
-rw-r--r-- | test/2b.py | 9 | ||||
-rw-r--r-- | test/2c.py | 13 | ||||
-rw-r--r-- | test/2d.py | 13 | ||||
-rw-r--r-- | test/2e.py | 17 |
5 files changed, 64 insertions, 0 deletions
diff --git a/test/2a.py b/test/2a.py new file mode 100644 index 0000000..f45041a --- /dev/null +++ b/test/2a.py @@ -0,0 +1,12 @@ +n = int(input()) +x = int(input()) +m = 1 +while n > 1: + tmp = 2 * x + m = m * tmp + n = n - 1 +c = 0 +for i in range(m): + g = 2 * m + c = c + i + g +print(m + c) diff --git a/test/2b.py b/test/2b.py new file mode 100644 index 0000000..d6d0bb2 --- /dev/null +++ b/test/2b.py @@ -0,0 +1,9 @@ +n = 1 +x = 2 +y = 3 +m = 1 +while n + 2 < 2 * x - 3 * y + 50: + m = m + n + n = n + 1 + +print(m) diff --git a/test/2c.py b/test/2c.py new file mode 100644 index 0000000..459cf8c --- /dev/null +++ b/test/2c.py @@ -0,0 +1,13 @@ +n = [0,0,0,0,0] +x = 3 +y = 7 +c = 0 +m = 1 +while y > 1: + tmp = 2 * x + y + m = m * tmp + y = y - 1 +for i in n: + g = 2 * m + i + c = c + i + g +print(m + c) diff --git a/test/2d.py b/test/2d.py new file mode 100644 index 0000000..a418aab --- /dev/null +++ b/test/2d.py @@ -0,0 +1,13 @@ +n = 2 +y = 7 +c = 0 +while y > 0: + g = 2 * n + c = y * n + g + y = y - 1 + +y = 5 +for i in range(y): + g = 2 * y + c = c + i + g +print(g) diff --git a/test/2e.py b/test/2e.py new file mode 100644 index 0000000..f7b111a --- /dev/null +++ b/test/2e.py @@ -0,0 +1,17 @@ +n = 2 +y = 7 +c = 0 +while y > 0: + g = 2 * n + c = y * n + g + y = y - 1 +y = 10 +g = 1 +for i in range(y): + g = i * y + c = c + i + g +while c > 0: + g = 4 * y + n = n + c + g + c = c - 1 +print(g) |