Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PALINGAM (AUG17) [Python] #200

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

PALINGAM (AUG17) [Python] #200

wants to merge 18 commits into from

Conversation

avsingh999
Copy link
Member

@avsingh999 avsingh999 commented Oct 3, 2017

Fixes #212

  • Pull Request Title is of form Problem Code (Contest Code) [Language].
  • This problem already had an entry in this repository.
    • This solution is better than the one already in this repository.
  • This solution is prepared by me and not copied from anywhere else on the web.
  • I have added a copyright comment in my solution.
  • I have updated README.md file (in the appropriate order).
  • I have read and followed Code Samples.
  • I understand that pull request will be closed if I failed to update it even once in a week.

@aashutoshrathi
Copy link
Member

Hi! Thanks for contributing to this repository.
Make sure you have checked points in PR correctly.

@aashutoshrathi aashutoshrathi changed the title Create palingam.py PALINGAM (AUG17) [Python] Oct 4, 2017
@avsingh999
Copy link
Member Author

what's wrong in the code

b = input()
la = list()
lb = list()
la = 26*[0]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add space around * and repush so that it will trigger travis logs and we can know whats going wrong.

@Monal5031
Copy link
Member

@avsingh999 There is no issue related to this PR, please always create one issue before sending a PR.

@avsingh999
Copy link
Member Author

now please check again what's wrong

@DivyeshPuri
Copy link
Collaborator

@avsingh999 Make require changes in month.md

@aashutoshrathi
Copy link
Member

@gitmate-bot rebase

@Monal5031 Monal5031 mentioned this pull request Oct 5, 2017
8 tasks
@aashutoshrathi
Copy link
Member

Comment on 9c41e4a, file 2017/AUG/AUG17/PALINGAM/palingam.py, line 2.

The code does not comply to PEP8.

Origin: PEP8Bear, Section: pep8.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpow3b1rvo/2017/AUG/AUG17/PALINGAM/palingam.py
+++ b/tmp/tmpow3b1rvo/2017/AUG/AUG17/PALINGAM/palingam.py
@@ -1,5 +1,5 @@
 t = int(input())
-while t > 0 :
+while t > 0:
     a = input()
     b = input()
     la = list()

Copy link
Member

@aashutoshrathi aashutoshrathi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your patience @avsingh999

@@ -0,0 +1,15 @@
t = int(input())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is still here @avsingh999

@@ -0,0 +1,28 @@
t = int(input())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File name should be all-caps.

w = w + smax * ra
if rb != 0:
w = w + smin
rb -= 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code does not comply to PEP8.

Origin: PEP8Bear, Section: pep8.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpm5bfynyn/2017/OCT/OCT17/CHEFGP.py
+++ b/tmp/tmpm5bfynyn/2017/OCT/OCT17/CHEFGP.py
@@ -29,7 +29,7 @@
         w = w + smax * ra
         if rb != 0:
             w = w + smin
-            rb -= 1;
+            rb -= 1
     elif ra >= x:
         k = x
         i = 0

i += 1
print(w)
t -= 1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code does not comply to PEP8.

Origin: PEP8Bear, Section: pep8.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpm5bfynyn/2017/OCT/OCT17/CHEFGP.py
+++ b/tmp/tmpm5bfynyn/2017/OCT/OCT17/CHEFGP.py
@@ -61,4 +61,3 @@
             i += 1
     print(w)
     t -= 1
-    

@aashutoshrathi
Copy link
Member

Comment on 3ace4a0, file 2017/OCT/OCT17/CHEFGP.py, line 32.

The code does not comply to PEP8.

Origin: PEP8Bear, Section: pep8.

The issue can be fixed by applying the following patch:

--- a/tmp/tmp_qnjh1q3/2017/OCT/OCT17/CHEFGP.py
+++ b/tmp/tmp_qnjh1q3/2017/OCT/OCT17/CHEFGP.py
@@ -29,7 +29,7 @@
         w = w + smax * ra
         if rb != 0:
             w = w + smin
-            rb -= 1;
+            rb -= 1
     elif ra >= x:
         k = x
         i = 0

@aashutoshrathi
Copy link
Member

Comment on 3ace4a0, file 2017/OCT/OCT17/CHEFGP.py, line 64.

The code does not comply to PEP8.

Origin: PEP8Bear, Section: pep8.

The issue can be fixed by applying the following patch:

--- a/tmp/tmp_qnjh1q3/2017/OCT/OCT17/CHEFGP.py
+++ b/tmp/tmp_qnjh1q3/2017/OCT/OCT17/CHEFGP.py
@@ -61,4 +61,3 @@
             i += 1
     print(w)
     t -= 1
-    

@aashutoshrathi
Copy link
Member

Comment on 04f39da, file 2017/AUG/COOK85/OBTTRNGL/OBTTRNGL.py, line 3.

The code does not comply to PEP8.

Origin: PEP8Bear, Section: pep8.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpchqeg53q/2017/AUG/COOK85/OBTTRNGL/OBTTRNGL.py
+++ b/tmp/tmpchqeg53q/2017/AUG/COOK85/OBTTRNGL/OBTTRNGL.py
@@ -1,8 +1,8 @@
 t = int(input())
 for i in range(t):
-    n,x,y = map(int ,input().split())
-    a = min(x,y)
-    b = max(x,y)
+    n, x, y = map(int, input().split())
+    a = min(x, y)
+    b = max(x, y)
     b = b - a + 1
     a = 1
     if (n%2 == 0 and n/2 == b - a) or (b - a == 1 or b == n):

@aashutoshrathi
Copy link
Member

Comment on 04f39da, file 2017/AUG/COOK85/OBTTRNGL/OBTTRNGL.py, line 8.

The code does not comply to PEP8.

Origin: PEP8Bear, Section: pep8.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpchqeg53q/2017/AUG/COOK85/OBTTRNGL/OBTTRNGL.py
+++ b/tmp/tmpchqeg53q/2017/AUG/COOK85/OBTTRNGL/OBTTRNGL.py
@@ -5,7 +5,7 @@
     b = max(x,y)
     b = b - a + 1
     a = 1
-    if (n%2 == 0 and n/2 == b - a) or (b - a == 1 or b == n):
+    if (n % 2 == 0 and n/2 == b - a) or (b - a == 1 or b == n):
         print("0")
     else:
         if b > n/2 + 1:

@aashutoshrathi
Copy link
Member

Comment on 04f39da, file 2017/AUG/COOK85/OBTTRNGL/OBTTRNGL.py, line 15.

The code does not comply to PEP8.

Origin: PEP8Bear, Section: pep8.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpchqeg53q/2017/AUG/COOK85/OBTTRNGL/OBTTRNGL.py
+++ b/tmp/tmpchqeg53q/2017/AUG/COOK85/OBTTRNGL/OBTTRNGL.py
@@ -12,4 +12,3 @@
             print(n - b)
         elif b < n/2 + 1:
             print(b - 2)
-            

@aashutoshrathi
Copy link
Member

Comment on 04f39da, file 2017/OCT/OCT17/CHEFGP.py, line 32.

The code does not comply to PEP8.

Origin: PEP8Bear, Section: pep8.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpchqeg53q/2017/OCT/OCT17/CHEFGP.py
+++ b/tmp/tmpchqeg53q/2017/OCT/OCT17/CHEFGP.py
@@ -29,7 +29,7 @@
         w = w + smax * ra
         if rb != 0:
             w = w + smin
-            rb -= 1;
+            rb -= 1
     elif ra >= x:
         k = x
         i = 0

@aashutoshrathi
Copy link
Member

Comment on 04f39da, file 2017/OCT/OCT17/CHEFGP.py, line 64.

The code does not comply to PEP8.

Origin: PEP8Bear, Section: pep8.

The issue can be fixed by applying the following patch:

--- a/tmp/tmpchqeg53q/2017/OCT/OCT17/CHEFGP.py
+++ b/tmp/tmpchqeg53q/2017/OCT/OCT17/CHEFGP.py
@@ -61,4 +61,3 @@
             i += 1
     print(w)
     t -= 1
-    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PALINGAM (AUG) [PYTHON]
5 participants