去除 import t, c

This commit is contained in:
TermiNexus committed 2026-10-17 21:57:03 +08:00
1 parent 579cf8d8e0
commit e67b80c083
112 files changed
+1235 -1347

No files matched your search

-3
View File
@@ -1,6 +1,3 @@
import t, c
define POSMAX = 100
define MAX_RETRY = 5
define BUFFER_SIZE = 256
-1
View File
@@ -1,5 +1,4 @@
import stdio
import t, c
import config
import test
import testcheck
+7 -8
View File
@@ -1,5 +1,4 @@
import config
import t, c
def AboutSizeTWhileTest(length: sizet):
@@ -80,8 +79,8 @@ def WhileWithElifElseTest(start: int, end: int):
def NestedWhileWithMacrosTest(outer_limit: int, inner_limit: int):
inner: int = 0
total_ops: int = 0
for outer in range(outer_limit):
for inner in range(inner_limit):
for outer in range(outer_limit):
for inner in range(inner_limit):
if inner == config.TRUE:
print("Inner loop break condition at: ", inner)
total_ops += 1
@@ -111,7 +110,7 @@ def ComplexConditionTest(a: int, b: int, c_val: int):
def RetryLoopTest(retry_count: int) -> int:
success: int = 0
for attempt in range(retry_count):
for attempt in range(retry_count):
if attempt < config.MAX_RETRY:
print("Attempt: ", attempt, " less than max")
success = attempt * 2
@@ -183,7 +182,7 @@ def CompoundAssignmentMathTest(a: int, b: int) -> int:
def PowerAndModuloTest(base: int, exponent: int) -> int:
result: int = 1
temp: int = 0
for i in range(exponent):
for i in range(exponent):
result *= base
print("Power: ", result)
temp = result % config.MODULO_DIVISOR
@@ -220,7 +219,7 @@ def MixedArithmeticTest(x: int, y: int, z: int) -> int:
def MathWithWhileLoopTest(start: int, count: int) -> int:
accumulator: int = 0
multiplier: int = config.MATH_SCALE
for idx in range(count):
for idx in range(count):
temp: int = (start + idx) * multiplier
temp = temp + config.MATH_OFFSET
if temp > config.THRESHOLD:
@@ -237,7 +236,7 @@ def ComplexNestedMathTest(a: int, b: int) -> int:
layer3: int = 0
layer1 = (a + b) * config.MATH_SCALE
print("Layer1: ", layer1)
for i in range(config.BIT_RANGE):
for i in range(config.BIT_RANGE):
layer2 += layer1 >> 1
print("Layer2: ", layer2)
layer3 = layer1 + layer2 - config.MATH_OFFSET
@@ -249,7 +248,7 @@ def ComplexNestedMathTest(a: int, b: int) -> int:
def ConditionalMathChainTest(value: int) -> int:
result: int = 0
for step in range(config.LOOP_LIMIT):
for step in range(config.LOOP_LIMIT):
if step < 5:
result += step * config.MATH_SCALE
print("step<5: ", result)