summaryrefslogtreecommitdiff
path: root/account
diff options
context:
space:
mode:
Diffstat (limited to 'account')
-rw-r--r--account/__init__.py0
-rw-r--r--account/quick_deduction.py22
2 files changed, 22 insertions, 0 deletions
diff --git a/account/__init__.py b/account/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/account/__init__.py
diff --git a/account/quick_deduction.py b/account/quick_deduction.py
new file mode 100644
index 0000000..a12fb64
--- /dev/null
+++ b/account/quick_deduction.py
@@ -0,0 +1,22 @@
+
+
+def deduction(x):
+ if x < 36000:
+ return x*0.03
+ if x < 144000:
+ return 36000*0.03 - 36000*0.1
+ if x < 300000:
+ return 36000*0.03 + (144000 - 36000)*0.1 - 144000*0.2
+ if x < 420000:
+ return 36000*0.03 + (144000 - 36000)*0.1 + (300000 - 144000)*0.2 - 300000*0.25
+ if x < 660000:
+ return 36000*0.03 + (144000 - 36000)*0.1 + (300000 - 144000)*0.2 + (420000 - 300000)*0.25 - 420000*0.3
+ if x < 960000:
+ return 36000 * 0.03 + (144000 - 36000) * 0.1 + (300000 - 144000) * 0.2 + (420000 - 300000) * 0.25 + (660000 - 420000) * 0.3 - 660000*0.35
+ return 36000 * 0.03 + (144000 - 36000) * 0.1 + (300000 - 144000) * 0.2 + (420000 - 300000) * 0.25 + (660000 - 420000) * 0.3 + (960000 - 660000)*0.35 - 960000*0.45
+
+
+if __name__ == '__main__':
+ for x in [10000, 100000, 200000, 300000, 400000, 500000, 600000, 700000, 800000, 900000, 10000000]:
+ print(x, deduction(x))
+