回答編集履歴

1

Update

2021/12/20 08:07

投稿

melian
melian

スコア20655

test CHANGED
@@ -14,19 +14,21 @@
14
14
 
15
15
  num1, num2 = r['num1'], r['num2']
16
16
 
17
+ n = A * num1
18
+
17
- if 0 < A * num1 < 10:
19
+ if 0 < n < 10:
18
20
 
19
21
  return 5
20
22
 
21
- elif 10 <= A * num1 < 100:
23
+ elif 10 <= n < 100:
22
24
 
23
25
  return 10 * A * num2
24
26
 
25
- elif 100 <= A * num1 < 200:
27
+ elif 100 <= n < 200:
26
28
 
27
29
  return 15 * A * num2
28
30
 
29
- elif 200 <= A * num1:
31
+ elif 200 <= n:
30
32
 
31
33
  return 20 * A * num2
32
34