Új hozzászólás Aktív témák
-
olli
tag
Sziasztok!
import itertools
# Define the range of numbers (1 to 90)
numbers = range(1, 91)
# Define the target sum
target_sum = 225
# Generate all combinations of 5 numbers from the range 1 to 90
combinations = itertools.combinations(numbers, 5)
# Filter combinations whose sum equals the target_sum
valid_combinations = [comb for comb in combinations if sum(comb) == target_sum]
# Format the first 299018 valid combinations for Excel
formatted_combinations = "\n".join([",".join(map(str, comb)) for comb in valid_combinations[:299018]])
# Print the formatted combinations for Excel
print(formatted_combinations)
A fenti táblázat 299018 sora helyett csak 9030 sort kaptam vissza. Ez korlát, vagy valahol be kell állítani?
Új hozzászólás Aktív témák
- BESZÁMÍTÁS! ASUS TUF Z790 i9 14900K 32GB DDR5 1TB SSD RX 9070 XT 16GB ZALMAN Z10 PLUS Seasonic 750W
- Samsung Galaxy A34 5G 128GB, Kártyafüggetlen, 1 Év Garanciával
- ÁRGARANCIA!Épített KomPhone i5 14600KF 32/64GB RAM RX 9070 16GB GAMER PC termékbeszámítással
- Apple iPhone 13 Pro Max Graphite ProMotion 120 Hz, Pro kamerák 128 GB-100%-3hó gari!
- BASEUS Compact Quick Charger 2xUSB USB-C PD 3A 30W fekete
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest

