aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorOmar Magdy <omar.professional8777@gmail.com>2022-05-09 16:54:41 +0200
committerOmar Magdy <omar.professional8777@gmail.com>2022-05-09 16:54:41 +0200
commit79d618f6b9a45d82023792140e70d271485cf005 (patch)
tree55dd529dbea2327d0a23e80b78f8912e73633e6d /python
parentc7cecfca5337473def7f1c9adba208ab33a11c8e (diff)
downloadcompetitive-programming-79d618f6b9a45d82023792140e70d271485cf005.tar.xz
competitive-programming-79d618f6b9a45d82023792140e70d271485cf005.zip
Added some new problems
Diffstat (limited to 'python')
-rwxr-xr-x[-rw-r--r--]python/CombinationLock.py0
-rw-r--r--python/DormsRoom.py7
2 files changed, 7 insertions, 0 deletions
diff --git a/python/CombinationLock.py b/python/CombinationLock.py
index 0ac8b2c..0ac8b2c 100644..100755
--- a/python/CombinationLock.py
+++ b/python/CombinationLock.py
diff --git a/python/DormsRoom.py b/python/DormsRoom.py
new file mode 100644
index 0000000..8dcfa75
--- /dev/null
+++ b/python/DormsRoom.py
@@ -0,0 +1,7 @@
+tt = int(input())
+n = int(input())
+s = input()
+sp, chars = map(str, input())
+sp = int(sp)
+idx = s[::-1].index(chars)
+print(idx)