-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ac854f
commit 0ae3a36
Showing
25 changed files
with
219 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# بدخواه پویان | ||
# ID : 2705 | ||
# https://quera.ir/problemset/contest/2705/%D8%A8%D8%AF%D8%AE%D9%88%D8%A7%D9%87%20%D9%BE%D9%88%DB%8C%D8%A7%D9%86 | ||
# https://b2n.ir/q46709 | ||
|
||
p, d = [int(i) for i in input().split()] | ||
|
||
x = 1 | ||
while True: | ||
if 0 <= (x * d) % p <= p/2: | ||
print(x * d) | ||
break | ||
x += 1 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# بازگشت از بوستان | ||
# ID : 3029 | ||
# https://quera.ir/problemset/contest/3029/%D8%A8%D8%A7%D8%B2%DA%AF%D8%B4%D8%AA%20%D8%A7%D8%B2%20%D8%A8%D9%88%D8%B3%D8%AA%D8%A7%D9%86 | ||
# https://b2n.ir/p21874 | ||
|
||
x, y = [int(i) for i in input().split()] | ||
x1, y1 = [int(i) for i in input().split()] | ||
|
||
print("Right" if x1 > x else "Left") | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# دایره عجیب | ||
# ID : 34081 | ||
# https://quera.ir/problemset/contest/34081/%D8%B3%D8%A4%D8%A7%D9%84-%D8%B1%DB%8C%D8%A7%D8%B6%DB%8C%D8%A7%D8%AA-%D8%AF%D8%A7%DB%8C%D8%B1%D9%87-%D8%B9%D8%AC%DB%8C%D8%A8 | ||
# https://b2n.ir/s60073 | ||
|
||
n, k = [int(i) for i in input().split()] | ||
|
||
turn = 1 | ||
count = 1 | ||
while True: | ||
turn += k | ||
turn = (turn - n) if turn > n else turn | ||
|
||
if turn == 1: | ||
break | ||
count += 1 | ||
|
||
print(count) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# دوربین مداربسته | ||
# ID : 2794 | ||
# https://quera.ir/problemset/contest/2794/%D8%B3%D8%A4%D8%A7%D9%84-%D8%AF%D9%88%D8%B1%D8%A8%DB%8C%D9%86-%D9%85%D8%AF%D8%A7%D8%B1%D8%A8%D8%B3%D8%AA%D9%87 | ||
# https://b2n.ir/771462 | ||
|
||
a = input().split() | ||
b = input().split() | ||
c = input().split() | ||
|
||
d1 = [a[0], b[0], c[0]] | ||
d1 = [i for i in set(d1) if d1.count(i) == 1] | ||
d2 = [a[1], b[1], c[1]] | ||
d2 = [i for i in set(d2) if d2.count(i) == 1] | ||
print(d1[0], d2[0]) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# اسمها | ||
# ID : 2529 | ||
# https://quera.ir/problemset/contest/2529/%D8%B3%D8%A4%D8%A7%D9%84-%D8%A7%D8%B3%D9%85%D9%87%D8%A7 | ||
# https://b2n.ir/q28319 | ||
|
||
n = int(input()) | ||
|
||
lister = [] | ||
for i in range(n): | ||
lister.append(input()) | ||
|
||
print(max([len(set(i)) for i in lister])) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# گزارش کار | ||
# ID : 49535 | ||
# https://quera.ir/problemset/contest/49535/%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-%DA%AF%D8%B2%D8%A7%D8%B1%D8%B4-%DA%A9%D8%A7%D8%B1 | ||
# https://b2n.ir/j07770 | ||
|
||
n, k = [int(i) for i in input().split()] | ||
|
||
sum = 0 | ||
for i in range(n): | ||
sum += int(input()) | ||
print("YES" if sum >= k else "NO") |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# هندونهخوری | ||
# ID : 35253 | ||
# https://quera.ir/problemset/contest/35253/%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-%D9%87%D9%86%D8%AF%D9%88%D9%86%D9%87%D8%AE%D9%88%D8%B1%DB%8C | ||
# https://b2n.ir/f48514 | ||
|
||
n = int(input()) | ||
string = [int(i) for i in input().split()] | ||
print(string.index(max(string)) + 1) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# خریدار ناشی | ||
# ID : 2755 | ||
# https://quera.ir/problemset/contest/2755/%D8%AE%D8%B1%DB%8C%D8%AF%D8%A7%D8%B1%20%D9%86%D8%A7%D8%B4%DB%8C | ||
# https://b2n.ir/y03346 | ||
|
||
n, m, k = [int(i) for i in input().split()] | ||
|
||
lister = [] | ||
for i in range(k): | ||
lister.append([int(i) for i in input().split()]) | ||
|
||
if k % 2 != 0: | ||
print(0) | ||
elif k == m * n: | ||
print(-1) | ||
else: | ||
for i in range(1, n+1): | ||
for j in range(1, m+1): | ||
if [i, j] not in lister: | ||
print(1, " ".join([str(i), str(j)]), sep="\n") | ||
break | ||
else: | ||
continue | ||
break |
Binary file not shown.
10 changes: 10 additions & 0 deletions
10
Solved/Morabaha Va Moshkelate Eghtesadi/Morabaha Va Moshkelate Eghtesadi.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# مربّاها و مشکلات اقتصادی | ||
# ID : 20249 | ||
# https://quera.ir/problemset/contest/20249/%D8%B3%D8%A4%D8%A7%D9%84-%D9%85%D8%B1%D8%A8%D8%A7%D9%87%D8%A7-%D9%88-%D9%85%D8%B4%DA%A9%D9%84%D8%A7%D8%AA-%D8%A7%D9%82%D8%AA%D8%B5%D8%A7%D8%AF%DB%8C | ||
# https://b2n.ir/u30756 | ||
|
||
n, k = [int(i) for i in input().split()] | ||
string = [int(i) for i in input().split()] | ||
sums = sum(string) | ||
|
||
print(n - (- (-sums // k))) |
Binary file added
BIN
+609 KB
Solved/Morabaha Va Moshkelate Eghtesadi/مسابقه _ مربّاها و مشکلات اقتصادی.pdf
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# سراب | ||
# ID : 4067 | ||
# https://quera.ir/problemset/contest/4067/%D8%B3%D8%A4%D8%A7%D9%84-%D8%B3%D8%B1%D8%A7%D8%A8 | ||
# https://b2n.ir/a44383 | ||
|
||
t = int(input()) | ||
keeper = [] | ||
for i in range(t): | ||
keeper.append([int(i) for i in input().split()]) | ||
|
||
locs = [(0, 0)] | ||
k = 1 | ||
for i in range(1, 15000): | ||
if i % 2 != 0: | ||
locs.append((locs[i-1][0] + 1, locs[i-1][1] + 1)) | ||
else: | ||
if k % 2 != 0: | ||
locs.append((locs[i-1][0] + 1, locs[i-1][1] - 1)) | ||
else: | ||
locs.append((locs[i-1][0] - 1, locs[i-1][1] + 1)) | ||
k += 1 | ||
|
||
for i in keeper: | ||
if (i[0], i[1]) in locs: | ||
print(locs.index(((i[0], i[1])))) | ||
else: | ||
print(-1) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# یک ساعت | ||
# ID : 2886 | ||
# https://quera.ir/problemset/contest/2886/%D8%B3%D8%A4%D8%A7%D9%84-%DB%8C%DA%A9-%D8%B3%D8%A7%D8%B9%D8%AA | ||
# https://b2n.ir/y36493 | ||
|
||
hour, min = [int(i) for i in input().split()] | ||
min = "00" if min == 0 else str(60 - min) | ||
hour = "00" if hour == 0 else str(12 - hour) | ||
|
||
if len(min) < 2: | ||
min = "0" + min | ||
if len(hour) < 2: | ||
hour = "0" + hour | ||
|
||
print(f'{hour}:{min}') |
Binary file not shown.