问题

### Instructions: You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests. You will NOT return anything except for the program.
### Question:
Print an arithmetic sequence with first term A, last term B, and common difference D.
You are only given inputs for which such an arithmetic sequence exists.

Input

The input is given from Standard Input in the following format:
A B D

Output

Print the terms of the arithmetic sequence with first term A, last term B, and common difference D, in order, separated by spaces.

Constraints


- 1 \leq A \leq B \leq 100
- 1 \leq D \leq 100
- There is an arithmetic sequence with first term A, last term B, and common difference D.
- All input values are integers.

Sample Input 1

3 9 2

Sample Output 1

3 5 7 9

The arithmetic sequence with first term 3, last term 9, and common difference 2 is (3,5,7,9).

Sample Input 2

10 10 1

Sample Output 2

10

The arithmetic sequence with first term 10, last term 10, and common difference 1 is (10).

### Format: Read the inputs from stdin solve the problem and write the answer to stdout (do not directly test on the sample inputs). Enclose your code within delimiters as follows.
```python
# YOUR CODE HERE
```

### Answer: (use the provided format with backticks)

答案

模型 模型答案 正确答案
金声玉亮2.0 ```python
# YOUR CODE HERE
import sys
input = sys.stdin.read
data = input().split()
A = int(data[0])
B = int(data[1])
D = int(data[2])

sequence = []
current = A
while current <= B:
sequence.append(current)
current += D

print(" ".join(map(str, sequence)))
```
[{"input": "3 9 2\n", "output": "3 5 7 9\n", "testtype": "stdin"}, {"input": "10 10 1\n", "output": "10\n", "testtype": "stdin"}]
deepseek-r1

```python
# Read the input values
A, B, D = map(int, input().split())

# Generate the arithmetic sequence
sequence = list(range(A, B + 1, D))

# Print the sequence elements separated by spaces
print(' '.join(map(str, sequence)))
```
[{"input": "3 9 2\n", "output": "3 5 7 9\n", "testtype": "stdin"}, {"input": "10 10 1\n", "output": "10\n", "testtype": "stdin"}]
gpto1 ```python
# YOUR CODE HERE
A, B, D = map(int, input().split())
sequence = range(A, B + 1, D)
print(' '.join(map(str, sequence)))
```
[{"input": "3 9 2\n", "output": "3 5 7 9\n", "testtype": "stdin"}, {"input": "10 10 1\n", "output": "10\n", "testtype": "stdin"}]
gpt-4o-2024-08-06 ```python
# YOUR CODE HERE
def print_arithmetic_sequence():
import sys
input = sys.stdin.read
data = input().strip()

A, B, D = map(int, data.split())

sequence = []
current_term = A
while current_term <= B:
sequence.append(current_term)
current_term += D

print(" ".join(map(str, sequence)))

print_arithmetic_sequence()
```
[{"input": "3 9 2\n", "output": "3 5 7 9\n", "testtype": "stdin"}, {"input": "10 10 1\n", "output": "10\n", "testtype": "stdin"}]
Qwen2-72B-Instruct ```python
a, b, d = map(int, input().split())
seq = []
current_term = a

while current_term <= b:
seq.append(str(current_term))
current_term += d

print(" ".join(seq))
```
```
[{"input": "3 9 2\n", "output": "3 5 7 9\n", "testtype": "stdin"}, {"input": "10 10 1\n", "output": "10\n", "testtype": "stdin"}]
DeepSeek-Coder-V2-Lite-Instruct ```python
# YOUR CODE HERE
A, B, D = map(int, input().split())
sequence = []
current = A
while current <= B:
sequence.append(current)
current += D
for term in sequence:
print(term, end=' ')
```
[{"input": "3 9 2\n", "output": "3 5 7 9\n", "testtype": "stdin"}, {"input": "10 10 1\n", "output": "10\n", "testtype": "stdin"}]
Meta-Llama-3.1-405B-Instruct-Turbo ```python
import sys

A, B, D = map(int, sys.stdin.readline().split())

sequence = []
current_term = A

while current_term <= B:
sequence.append(current_term)
current_term += D

print(' '.join(map(str, sequence)))
```
[{"input": "3 9 2\n", "output": "3 5 7 9\n", "testtype": "stdin"}, {"input": "10 10 1\n", "output": "10\n", "testtype": "stdin"}]
Meta-Llama-3.1-70B-Instruct-Turbo ```python
# YOUR CODE HERE
A, B, D = map(int, input().split())
sequence = [A]
while sequence[-1] < B:
sequence.append(sequence[-1] + D)
print(*sequence)
```
[{"input": "3 9 2\n", "output": "3 5 7 9\n", "testtype": "stdin"}, {"input": "10 10 1\n", "output": "10\n", "testtype": "stdin"}]
baichuan4 ```python
# YOUR CODE HERE

# Read input values
A, B, D = map(int, input().split())

# Calculate the number of terms in the sequence
n = (B - A) // D + 1

# Generate and print the arithmetic sequence
sequence = [A + i * D for i in range(n)]
print(' '.join(map(str, sequence)))
```
[{"input": "3 9 2\n", "output": "3 5 7 9\n", "testtype": "stdin"}, {"input": "10 10 1\n", "output": "10\n", "testtype": "stdin"}]
doubao ```python
A, B, D = map(int, input().split())
i = A
while i <= B:
print(i, end=" ")
i += D
print()
```
[{"input": "3 9 2\n", "output": "3 5 7 9\n", "testtype": "stdin"}, {"input": "10 10 1\n", "output": "10\n", "testtype": "stdin"}]
gpto1 ```python
# YOUR CODE HERE
A, B, D = map(int, input().split())
sequence = range(A, B + 1, D)
print(' '.join(map(str, sequence)))
```
[{"input": "3 9 2\n", "output": "3 5 7 9\n", "testtype": "stdin"}, {"input": "10 10 1\n", "output": "10\n", "testtype": "stdin"}]
kimi ```python
# YOUR CODE HERE
(A, B, D) = map(int, input().split())
if A == B:
print(A)
else:
count = 0
while A <= B:
print(A, end=' ')
A += D
count += 1
if count == 0:
print(A)
```
[{"input": "3 9 2\n", "output": "3 5 7 9\n", "testtype": "stdin"}, {"input": "10 10 1\n", "output": "10\n", "testtype": "stdin"}]
minimax ```python
# YOUR CODE HERE
A, B, D = map(int, input().split())
sequence = []
current_term = A
while current_term <= B:
sequence.append(current_term)
current_term += D
print(' '.join(map(str, sequence)))
```
[{"input": "3 9 2\n", "output": "3 5 7 9\n", "testtype": "stdin"}, {"input": "10 10 1\n", "output": "10\n", "testtype": "stdin"}]
wenxinyiyan ```python
# Read the input values
A, B, D = map(int, input().split())

# Initialize the current term
current_term = A

# Print the terms of the arithmetic sequence
while current_term <= B:
print(current_term, end=' ')
current_term += D
```
[{"input": "3 9 2\n", "output": "3 5 7 9\n", "testtype": "stdin"}, {"input": "10 10 1\n", "output": "10\n", "testtype": "stdin"}]
zhipu ```python
# YOUR CODE HERE
import sys

def main():
input = sys.stdin.read
data = input().strip().split()
A, B, D = int(data[0]), int(data[1]), int(data[2])

sequence = []
current_term = A
while current_term <= B:
sequence.append(current_term)
current_term += D

print(" ".join(map(str, sequence)))

if __name__ == "__main__":
main()
```
[{"input": "3 9 2\n", "output": "3 5 7 9\n", "testtype": "stdin"}, {"input": "10 10 1\n", "output": "10\n", "testtype": "stdin"}]
deepseek-v3 ```python
# YOUR CODE HERE
A, B, D = map(int, input().split())
current = A
sequence = []
while current <= B:
sequence.append(str(current))
current += D
print(' '.join(sequence))
```
[{"input": "3 9 2\n", "output": "3 5 7 9\n", "testtype": "stdin"}, {"input": "10 10 1\n", "output": "10\n", "testtype": "stdin"}]