DeepSeek V4 ProMath and code
DeepSeek's model for problems that need thinking: math, algorithms, checking requirements. Over a million tokens of context
Price shown before you run · One-time payment, no auto-renewal
A train covers half the distance at 60 km/h and the other half at 90 km/h. What is the average speed? Solve it and explain why it is not 75.
The average speed is 72 km/h, not 75 km/h.
Explanation: Average speed is defined as total distance divided by total time. If the total distance is 2D, then:
- Time for the first half: t_1 = (D)/(60)
- Time for the second half: t_2 = (D)/(90)
- Total time: T = (D)/(60) + (D)/(90) = D≤ft((3+2)/(180)) = (5D)/(180) = (D)/(36)
- Average speed: v_avg = (2D)/(D/36) = 72 km/h
It is not 75 km/h because the arithmetic mean ( (60+90)/2 ) would only apply if the train spent equal times at each speed. Here, the train covers equal distances, so it spends a longer time traveling at the slower 60 km/h. This gives the slower speed more weight in the average, pulling it below the arithmetic mean. The correct average for equal distances is the harmonic mean of the speeds.
Solves and checks
An algorithm with its complexity and contradictions in a spec
Write a Python function that checks in O(n) whether a string's letters can be rearranged into a palindrome. Explain briefly.
Below is a Python function that determines in O(n) time whether the letters of a string can be rearranged to form a palindrome.
from collections import Counter
def can_permute_to_palindrome(s: str) -> bool:
"""
Returns True if the characters of s can be permuted into a palindrome.
Runs in O(n) time, where n = len(s).
"""
freq = Counter(s)
# A palindrome can have at most one character with an odd frequency.
odd_count = sum(1 for count in freq.values() if count % 2 == 1)
return odd_count <= 1
Find the contradictions: "Passwords are at least 8 characters. On old devices passwords are at most 6 characters. Login is by password only. Everyone can log in with an SMS code." Keep it short.
- Passwords cannot be both "at least 8 characters" and "at most 6 characters" on old devices.
- "Login is by password only" conflicts with "Everyone can log in with an SMS code."
DeepSeek V4 Pro at a glance
- 1MContext tokens: long chats and big files
- ≈ 0.7 tokensPrice of one run
DeepSeek models
Pro for reasoning, Flash is cheaper and reads images
How to use DeepSeek V4 Pro
- 1Write a questionA task, text or code. Attach a file or a photo if needed
- 2Check the priceThe request price is on the button before you send
- 3Get the answerAsk to rewrite, refine or keep the conversation going
Compare
How much it costs
- per typical answer (1,500 input and 700 output model tokens)
- ≈ 0.7 tokens
The exact price is on the button before you run it
Questions about DeepSeek V4 Pro
Does DeepSeek V4 Pro understand screenshots?
Image support is not listed in its specifications. Among the DeepSeek models in this catalog, V4.1 Flash supports screenshots and diagrams.
What should I provide V4 Pro for code analysis?
Related code snippets, requirements, error messages, and expected behavior. A context window of up to 1,048,576 tokens allows you to discuss large amounts of text material.
Helpful guides
Guides and explainers from our blog
Try DeepSeek V4 Pro
Try for free

