Skip to content

Commit

Permalink
new questions added to solved and unsolved, readme updated
Browse files Browse the repository at this point in the history
  • Loading branch information
bestmahdi2 committed Apr 6, 2021
1 parent 4e22757 commit 79dabe0
Show file tree
Hide file tree
Showing 31 changed files with 246 additions and 42 deletions.
76 changes: 45 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,34 +48,47 @@
11 | 616 | [توان دو](https://b2n.ir/083186) | دانشگاهی | [Python](Solved/Tavan%20Do) |
12 | 617 | [عدد خودمقلوب](https://b2n.ir/932882) | دانشگاهی | [Python](Solved/Adade%20Khod%20Maghloob) |
13 | 618 | [چاپ لوزی](https://b2n.ir/304206) | دانشگاهی | [Python](Solved/Chape%20Lozi) |
14 | 655 | [فرزاد فیلم بین](https://b2n.ir/t13786) | دانشگاهی | [Python](Solved/Farzade%20Filmbin) |
15 | 2636 | [شطرنج حرفه‌ای](https://b2n.ir/571633) | مسابقه | [Python](Solved/Shatranje%20Herfei) |
16 | 2885 | [سوال زرد](https://b2n.ir/222646) | مسابقه | [Python](Solved/Soale%20Zard) |
17 | 2885 | [یک سوال ساده](https://b2n.ir/473372) | مسابقه | [Python](Solved/Yek%20Soale%20Sade) |
18 | 3405 | [چاپ برعکس](https://b2n.ir/637768) | مسابقه | [Python](Solved/Chape%20Baraks) |
19 | 3406 | [صدگان خسته](https://b2n.ir/957810) | مسابقه | [Python](Solved/Sadegane%20Khaste) |
20 | 3409 | [جدول ضرب گنده](https://b2n.ir/608271) | مسابقه | [Python](Solved/Jadval%20Zarbe%20Gonde) |
21 | 3414 | [دو نقطه خط](https://b2n.ir/n47769) | مسابقه | [Python](Solved/Do%20Noghte%20Khat) |
22 | 3429 | [یخدارچی](https://b2n.ir/773396) | مسابقه | [Python](Solved/Yakhdarchi) |
23 | 3538 | [آخ جون طرف نیست!](https://b2n.ir/s82371) | مسابقه | [Python](Solved/Akh%20joon%20Taraf%20Nist) |
24 | 3539 | [تک رقمی](https://b2n.ir/066773) | مسابقه | [Python](Solved/Tak%20Raghami) |
25 | 4065 | [خر در چمن فراوونه](https://b2n.ir/627599) | مسابقه | [C++, Python](Solved/Khar%20dar%20chaman%20faravoone) |
26 | 8838 | [کمک به کاپی](https://b2n.ir/718957) | مسابقه | [Python](Solved/Komak%20Be%20Copy) |
27 | 9773 | [لوزی های ستاره ای](https://b2n.ir/y21327) | دانشگاهی | [Python](Solved/Lozi%20Haye%20Setareee) |
28 | 9774 | [عدد چاپ کن](https://b2n.ir/593554) | دانشگاهی | [Python](Solved/Adad%20Chap%20Kon) |
29 | 10162 | [روز آزادی بیان در برره](https://b2n.ir/063396) | مسابقه | [Python](Solved/Rooze%20Azadi%20Bayan%20Da%20Barare) |
30 | 10230 | [مشق امشب باقر](https://b2n.ir/y28651) | مسابقه | [Python](Solved/Mashghe%20Emshabe%20Bagher) |
31 | 10325 | [همایش زندگی بهتر](https://b2n.ir/832593) | مسابقه | [Python](Solved/Hamayeshe%20Zandegi%20Behtar) |
32 | 20256 | [رژیم سخت](https://b2n.ir/t20497) | مسابقه | [Python](Solved/Rezhime%20Sakht) |
33 | 51865 | [بهداشت و سلامت](https://b2n.ir/064854) | مسابقه | [Python](Solved/Behdasht%20va%20Salamat) |
34 | --- | [تکرار حرف در رشته](Solved/Tekrare%20Harf%20Dar%20Reshte/غیره_تکرار%20حرف%20در%20رشته.pdf) | غیره | [Python](Solved/Tekrare%20Harf%20Dar%20Reshte) |
35 | --- | [جدول ضرب](Solved/Jadval%20Zarb/غیره_جدول%20ضرب.pdf) | غیره | [Python](Solved/Jadval%20Zarb) |
36 | --- | [سری فیبوناتچی](Solved/Seri%20Fibonacci/غیره_سری%20فیبوناتچی.pdf) | غیره | [Python](Solved/Seri%20Fibonacci) |
37 | --- | [عدد آرمسترانگ](Solved/Adade%20Armstrang/غیره_عدد%20آرمسترانگ.pdf) | غیره | [Python](Solved/Adade%20Armstrang) |
38 | --- | [عدد کامل](Solved/Adade%20Kamel/غیره_عدد%20کامل.pdf) | غیره | [Python](Solved/Adade%20Kamel) |
39 | --- | [مجموع ارقام](Solved/Majmo'e%20Arghaam/غیره_مجموع%20ارقام.pdf) | غیره | [Python](Solved/Majmo'e%20Arghaam) |
40 | --- | [مجموع اعداد](Solved/Majmo'e%20Adaad/غیره_مجموع%20اعداد.pdf) | غیره | [Python](Solved/Majmo'e%20Adaad) |
41 | --- | [میانگین اعداد](Solved/Miangine%20Adaad/غیره_میانگین%20اعداد.pdf) | غیره | [Python](Solved/Miangine%20Adaad) |
14 | 649 | [اول بینی](https://b2n.ir/f91551) | دانشگاهی | [Python](Solved/Aval%20Bini) |
15 | 655 | [فرزاد فیلم بین](https://b2n.ir/t13786) | دانشگاهی | [Python](Solved/Farzade%20Filmbin) |
16 | 2636 | [شطرنج حرفه‌ای](https://b2n.ir/571633) | مسابقه | [Python](Solved/Shatranje%20Herfei) |
17 | 2659 | [تست بینایی](https://b2n.ir/997305) | مسابقه | [Python](Solved/Teste%20Binaei) |
18 | 2885 | [سوال زرد](https://b2n.ir/222646) | مسابقه | [Python](Solved/Soale%20Zard) |
19 | 2885 | [یک سوال ساده](https://b2n.ir/473372) | مسابقه | [Python](Solved/Yek%20Soale%20Sade) |
20 | 3403 | [ساده تر](https://b2n.ir/r02497) | مسابقه | [Python](Solved/Sade%20Tar) |
21 | 3404 | [تو چقدر اضافه وزن داری؟](https://b2n.ir/785885) | مسابقه | [Python](Solved/To%20Cheghadr%20Ezafe%20Vazn%20Dari) |
22 | 3405 | [چاپ برعکس](https://b2n.ir/637768) | مسابقه | [Python](Solved/Chape%20Baraks) |
23 | 3406 | [صدگان خسته](https://b2n.ir/957810) | مسابقه | [Python](Solved/Sadegane%20Khaste) |
24 | 3408 | [سوال برنامه نویسی برنامه نویسی سوال](https://b2n.ir/w27089) | مسابقه | [Python](Solved/Soale%20Barname%20Nevisi%20Barname%20Nevisi%20Soal) |
25 | 3409 | [جدول ضرب گنده](https://b2n.ir/608271) | مسابقه | [Python](Solved/Jadval%20Zarbe%20Gonde) |
26 | 3414 | [دو نقطه خط](https://b2n.ir/n47769) | مسابقه | [Python](Solved/Do%20Noghte%20Khat) |
27 | 3429 | [یخدارچی](https://b2n.ir/773396) | مسابقه | [Python](Solved/Yakhdarchi) |
28 | 3430 | [بلندگو](https://b2n.ir/651861) | مسابقه | [Python](Solved/Bolandgoo) |
29 | 3538 | [آخ جون طرف نیست!](https://b2n.ir/s82371) | مسابقه | [Python](Solved/Akh%20joon%20Taraf%20Nist) |
30 | 3539 | [تک رقمی](https://b2n.ir/066773) | مسابقه | [Python](Solved/Tak%20Raghami) |
31 | 4065 | [خر در چمن فراوونه](https://b2n.ir/627599) | مسابقه | [C++, Python](Solved/Khar%20dar%20chaman%20faravoone) |
32 | 6082 | [آسمان شکر آباد](https://b2n.ir/k26599) | مسابقه | [Python](Solved/Asemane%20Shekar%20Abad) |
33 | 8838 | [کمک به کاپی](https://b2n.ir/718957) | مسابقه | [Python](Solved/Komak%20Be%20Copy) |
34 | 9773 | [لوزی های ستاره ای](https://b2n.ir/y21327) | دانشگاهی | [Python](Solved/Lozi%20Haye%20Setareee) |
35 | 9774 | [عدد چاپ کن](https://b2n.ir/593554) | دانشگاهی | [Python](Solved/Adad%20Chap%20Kon) |
36 | 10162 | [روز آزادی بیان در برره](https://b2n.ir/063396) | مسابقه | [Python](Solved/Rooze%20Azadi%20Bayan%20Da%20Barare) |
37 | 10230 | [مشق امشب باقر](https://b2n.ir/y28651) | مسابقه | [Python](Solved/Mashghe%20Emshabe%20Bagher) |
38 | 10231 | [خُب باقر سرما خورده](https://b2n.ir/e33907) | مسابقه | [Python](Solved/Khob%20Bagher%20Sarma%20Khorde) |
39 | 10325 | [همایش زندگی بهتر](https://b2n.ir/832593) | مسابقه | [Python](Solved/Hamayeshe%20Zandegi%20Behtar) |
40 | 10326 | [استارت-آپ باکلاس](https://b2n.ir/m53560) | مسابقه | [Python](Solved/Start-Up%20Bakelas) |
41 | 17244 | [شارژ موبایل](https://b2n.ir/040446) | مسابقه | [Python](Solved/Sharzhe%20Mobile) |
42 | 17675 | [رشته فیبوناچی](https://b2n.ir/055190) | مسابقه | [Python](Solved/Reshte%20Fibonacci) |
43 | 20256 | [رژیم سخت](https://b2n.ir/t20497) | مسابقه | [Python](Solved/Rezhime%20Sakht) |
44 | 28947 | [ام‌سین](https://b2n.ir/t37594) | مسابقه | [Python](Solved/EmSin) |
45 | 31025 | [صبا و سوال ساده](https://b2n.ir/585297) | مسابقه | [Python](Solved/Saba%20va%20Soale%20Sade) |
46 | 51865 | [بهداشت و سلامت](https://b2n.ir/064854) | مسابقه | [Python](Solved/Behdasht%20va%20Salamat) |
47 | --- | [تکرار حرف در رشته](Solved/Tekrare%20Harf%20Dar%20Reshte/غیره_تکرار%20حرف%20در%20رشته.pdf) | غیره | [Python](Solved/Tekrare%20Harf%20Dar%20Reshte) |
48 | --- | [جدول ضرب](Solved/Jadval%20Zarb/غیره_جدول%20ضرب.pdf) | غیره | [Python](Solved/Jadval%20Zarb) |
49 | --- | [سری فیبوناتچی](Solved/Seri%20Fibonacci/غیره_سری%20فیبوناتچی.pdf) | غیره | [Python](Solved/Seri%20Fibonacci) |
50 | --- | [عدد آرمسترانگ](Solved/Adade%20Armstrang/غیره_عدد%20آرمسترانگ.pdf) | غیره | [Python](Solved/Adade%20Armstrang) |
51 | --- | [عدد کامل](Solved/Adade%20Kamel/غیره_عدد%20کامل.pdf) | غیره | [Python](Solved/Adade%20Kamel) |
52 | --- | [مجموع ارقام](Solved/Majmo'e%20Arghaam/غیره_مجموع%20ارقام.pdf) | غیره | [Python](Solved/Majmo'e%20Arghaam) |
53 | --- | [مجموع اعداد](Solved/Majmo'e%20Adaad/غیره_مجموع%20اعداد.pdf) | غیره | [Python](Solved/Majmo'e%20Adaad) |
54 | --- | [میانگین اعداد](Solved/Miangine%20Adaad/غیره_میانگین%20اعداد.pdf) | غیره | [Python](Solved/Miangine%20Adaad) |

[:back: بازگشت به فهرست](#mag_right-فهرست)

Expand All @@ -90,9 +103,10 @@
3 | 595 | [مثلث خیام](https://b2n.ir/w17445) | دانشگاهی | [Python](UnSolved/Mosalase%20Khayam) |
4 | 597 | [حلزون مختصاتی](https://b2n.ir/k79177) | دانشگاهی | [Python](UnSolved/Halazoone%20Mokhtasaati) |
5 | 640 | [نردبونی](https://b2n.ir/w31372) | دانشگاهی | [Python](UnSolved/Nardebooni) |
6 | 649 | [اول بینی](https://b2n.ir/f91551) | دانشگاهی | [Python](UnSolved/Aval%20Bini) |
7 | 651 | [مبنای آینه‌ای](https://b2n.ir/j40014) | دانشگاهی | [Python](UnSolved/Mabnaye%20Ayne) |
8 | 658 | [فرزاد کارکن](https://b2n.ir/s16305) | دانشگاهی | [Python](UnSolved/Farzade%20Karkon) |
6 | 651 | [مبنای آینه‌ای](https://b2n.ir/j40014) | دانشگاهی | [Python](UnSolved/Mabnaye%20Ayne) |
7 | 658 | [فرزاد کارکن](https://b2n.ir/s16305) | دانشگاهی | [Python](UnSolved/Farzade%20Karkon) |
8 | 3410 | [مثلث خیام پاسکال](https://b2n.ir/275292) | مسابقه | [Python](UnSolved/Mosalase%20Khayam%20Pascal) |
9 | 3540 | [گردو شکستم](https://b2n.ir/037440) | مسابقه | [Python](UnSolved/Gerdoo%20Shekastam) |

[:back: بازگشت به فهرست](#mag_right-فهرست)

Expand Down
11 changes: 11 additions & 0 deletions Solved/Asemane Shekar Abad/Asemane Shekar Abad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# آسمان شکر آباد
# ID : 6082
# https://quera.ir/problemset/contest/6082/%D8%B3%D8%A4%D8%A7%D9%84-%D8%A2%D8%B3%D9%85%D8%A7%D9%86-%D8%B4%DA%A9%D8%B1-%D8%A2%D8%A8%D8%A7%D8%AF
# https://b2n.ir/k26599

starts = 0
for i in range(int(input().split()[0])):
starts += (input()).count("*")
print(starts)

###########################################################
Binary file not shown.
13 changes: 2 additions & 11 deletions UnSolved/Aval Bini/Aval Bini.Py → Solved/Aval Bini/Aval Bini.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,6 @@
# https://b2n.ir/f91551

a, b = int(input()), int(input())
# lister = []
# if a < b:
# for i in range(a+1, b):
# for j in range(2, i//2):
# if i % j == 0:
# break
# else:
# lister.append(str(i))
# print(",".join(lister))
# else:
# print(a)

result = ""
for i in range(a+1, b):
Expand All @@ -29,3 +18,5 @@
result += "," + str(i)

print(result)

###########################################################
10 changes: 10 additions & 0 deletions Solved/Bolandgoo/Bolandgoo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# بلندگو
# ID : 3430
# https://quera.ir/problemset/contest/3430/%D8%B3%D8%A4%D8%A7%D9%84-%D8%A8%D9%84%D9%86%D8%AF%DA%AF%D9%88
# https://b2n.ir/651861

string = input()
print(string)

for i in range(1, len(string)):
print(string[i] * i + string[i:])
Binary file added Solved/Bolandgoo/مسابقه _ بلندگو.pdf
Binary file not shown.
10 changes: 10 additions & 0 deletions Solved/EmSin/EmSin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ام‌سین
# ID : 28947
# https://quera.ir/problemset/contest/28947/%D8%B3%D8%A4%D8%A7%D9%84-%D9%BE%DB%8C%D8%A7%D8%AF%D9%87-%D8%B3%D8%A7%D8%B2%DB%8C-%D8%A7%D9%85%D8%B3%DB%8C%D9%86
# https://b2n.ir/t37594

number = int(input())
lister = ["sib", "samanoo", "senjed", "sabze", "somagh", "sir", "serke"]

for i in range(number):
print(lister[i])
Binary file added Solved/EmSin/مسابقه _ امسین.pdf
Binary file not shown.
13 changes: 13 additions & 0 deletions Solved/Khob Bagher Sarma Khorde/Khob Bagher Sarma Khorde.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# خُب باقر سرما خورده
# ID : 10231
# https://quera.ir/problemset/contest/10231/%D8%B3%D8%A4%D8%A7%D9%84-%D8%AE%D8%A8-%D8%A8%D8%A7%D9%82%D8%B1-%D8%B3%D8%B1%D9%85%D8%A7-%D8%AE%D9%88%D8%B1%D8%AF%D9%87
# https://b2n.ir/e33907

numbers = []
for i in range(5):
string = input()
if "MOLANA" in string or "HAFEZ" in string:
numbers.append(str(i + 1))
print(" ".join(numbers) if len(numbers) else "NOT FOUND!")

###########################################################
Binary file not shown.
21 changes: 21 additions & 0 deletions Solved/Reshte Fibonacci/Reshte Fibonacci.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# رشته فیبوناچی
# ID : 17675
# https://quera.ir/problemset/contest/17675/%D8%B3%D8%A4%D8%A7%D9%84-%D8%B1%D8%B4%D8%AA%D9%87-%D9%81%DB%8C%D8%A8%D9%88%D9%86%D8%A7%DA%86%DB%8C
# https://b2n.ir/055190

n = int(input())

fibo = [1, 1]
for i in range(2, 11):
fibo.append(fibo[i-2] + fibo[i-1])

keeper = []
for i in range(1, n + 1):
if i in fibo:
keeper.append("+")
else:
keeper.append("-")

print("".join(keeper))

###########################################################
Binary file not shown.
9 changes: 9 additions & 0 deletions Solved/Saba va Soale Sade/Saba va Soale Sade.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# صبا و سوال ساده
# ID : 31025
# https://quera.ir/problemset/contest/31025/%D8%B3%D8%A4%D8%A7%D9%84-%D9%BE%DB%8C%D8%A7%D8%AF%D9%87-%D8%B3%D8%A7%D8%B2%DB%8C-%D8%B5%D8%A8%D8%A7-%D9%88-%D8%B3%D9%88%D8%A7%D9%84-%D8%B3%D8%A7%D8%AF%D9%87
# https://b2n.ir/585297

string = input().split()
print(int(string[0])//2 ** int(string[1]))

###########################################################
Binary file not shown.
19 changes: 19 additions & 0 deletions Solved/Sade Tar/Sade Tar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# ساده تر
# ID : 3403
# https://quera.ir/problemset/contest/3403/%D8%B3%D8%A4%D8%A7%D9%84-%D8%B3%D8%A7%D8%AF%D9%87-%D8%AA%D8%B1
# https://b2n.ir/r02497

numbers = []
product = 1
for i in range(4):
n = int(input())
product *= n
numbers.append(n)

print(f'Sum : {"%.6f" % sum(numbers)}')
print(f'Average : {"%.6f" % (sum(numbers)/4)}')
print(f'Product : {"%.6f" % product}')
print(f'MAX : {"%.6f" % max(numbers)}')
print(f'MIN : {"%.6f" % min(numbers)}')

###########################################################
Binary file added Solved/Sade Tar/مسابقه _ ساده تر.pdf
Binary file not shown.
8 changes: 8 additions & 0 deletions Solved/Sharzhe Mobile/Sharzhe Mobile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# شارژ موبایل
# ID : 17244
# https://quera.ir/problemset/contest/17244/%D8%B3%D8%A4%D8%A7%D9%84-%D8%B4%D8%A7%D8%B1%DA%98-%D9%85%D9%88%D8%A8%D8%A7%DB%8C%D9%84
# https://b2n.ir/040446

print(sum([i for i in range(int(input()) + 1)]))

###########################################################
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# سوال برنامه نویسی برنامه نویسی سوال
# ID : 3408
# https://quera.ir/problemset/contest/3408/%D8%B3%D8%A4%D8%A7%D9%84-%D8%B3%D9%88%D8%A7%D9%84-%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87-%D9%86%D9%88%DB%8C%D8%B3%DB%8C-%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87-%D9%86%D9%88%DB%8C%D8%B3%DB%8C-%D8%B3%D9%88%D8%A7%D9%84
# https://b2n.ir/w27089

number = input()
string = input().split()

print(' '.join(string[::-1]))

###########################################################
22 changes: 22 additions & 0 deletions Solved/Start-Up Bakelas/Start-Up Bakelas.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# استارت-آپ باکلاس
# ID : 10326
# https://quera.ir/problemset/contest/10326/%D8%B3%D8%A4%D8%A7%D9%84-%D8%A7%D8%B3%D8%AA%D8%A7%D8%B1%D8%AA-%D8%A2%D9%BE-%D8%A8%D8%A7%DA%A9%D9%84%D8%A7%D8%B3
# https://b2n.ir/m53560

string = [int(i) for i in input().split()]

keeper = [0, 0, 0, 0]

person = 0
while True:
if 0 in string:
break

string[person % 4] -= 1
keeper[person % 4] += 1
string.insert(3, string.pop(0))
person += 1

print(" ".join([str(i) for i in keeper]))

###########################################################
Binary file not shown.
15 changes: 15 additions & 0 deletions Solved/Teste Binaei/Teste Binaei.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# تست بینایی
# ID : 2659
# https://quera.ir/problemset/contest/2659/%D8%B3%D8%A4%D8%A7%D9%84-%D8%AA%D8%B3%D8%AA-%D8%A8%DB%8C%D9%86%D8%A7%DB%8C%DB%8C
# https://b2n.ir/997305

letters = int(input())
original = input()
student = input()

number = 0

for i in range(letters):
if original[i] != student[i]:
number += 1
print(number)
Binary file not shown.
21 changes: 21 additions & 0 deletions Solved/To Cheghadr Ezafe Vazn Dari/To Cheghadr Ezafe Vazn Dari.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# تو چقدر اضافه وزن داری؟
# ID : 3404
# https://quera.ir/problemset/contest/3404/%D8%B3%D8%A4%D8%A7%D9%84-%D8%AA%D9%88-%DA%86%D9%82%D8%AF%D8%B1-%D8%A7%D8%B6%D8%A7%D9%81%D9%87-%D9%88%D8%B2%D9%86-%D8%AF%D8%A7%D8%B1%DB%8C
# https://b2n.ir/785885

weight = float(input())
height = float(input())

bmi = weight/(height ** 2)

print("%.2f" % bmi)
if bmi < 18.5:
print("Underweight")
elif bmi < 25:
print("Normal")
elif bmi < 30:
print("Overweight")
else:
print("Obese")

###########################################################
Binary file not shown.
22 changes: 22 additions & 0 deletions UnSolved/Gerdoo Shekastam/Gerdoo Shekastam.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# گردو شکستم
# ID : 3540
# https://quera.ir/problemset/contest/3540/%D8%B3%D8%A4%D8%A7%D9%84-%D8%AC%D8%B3%D8%AA-%D9%88-%D8%AC%D9%88-%D8%B1%DB%8C%D8%A7%D8%B6%DB%8C%D8%A7%D8%AA-%DA%AF%D8%B1%D8%AF%D9%88-%D8%B4%DA%A9%D8%B3%D8%AA%D9%85
# https://b2n.ir/037440

n, x, y = [int(i) for i in input().split()]

xtime = n//x
ytime = n//y

for i in range(xtime):
for j in range(ytime, -1, -1):
if (i * x + j * y) == n:
print(i, j)
break
else:
continue
break
else:
print(-1)

###########################################################
Binary file not shown.
7 changes: 7 additions & 0 deletions UnSolved/Mosalase Khayam Pascal/Mosalase Khayam Pascal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# مثلث خیام پاسکال
# ID : 3410
# https://quera.ir/problemset/contest/3410/%D8%B3%D8%A4%D8%A7%D9%84-%D9%BE%DB%8C%D8%A7%D8%AF%D9%87-%D8%B3%D8%A7%D8%B2%DB%8C-%D8%B1%DB%8C%D8%A7%D8%B6%DB%8C%D8%A7%D8%AA-%D9%85%D8%AB%D9%84%D8%AB-%D8%AE%DB%8C%D8%A7%D9%85-%D9%BE%D8%A7%D8%B3%DA%A9%D8%A7%D9%84
# https://b2n.ir/275292


###########################################################
Binary file not shown.

0 comments on commit 79dabe0

Please sign in to comment.