ChefLib icon indicating copy to clipboard operation
ChefLib copied to clipboard

PALINGAM (AUG17) [Python]

Open avsingh999 opened this issue 8 years ago • 14 comments

Fixes #212

  • [x] Pull Request Title is of form Problem Code (Contest Code) [Language].
  • [x] This problem already had an entry in this repository.
    • [ ] This solution is better than the one already in this repository.
  • [x] This solution is prepared by me and not copied from anywhere else on the web.
  • [ ] I have added a copyright comment in my solution.
  • [x] I have updated README.md file (in the appropriate order).
  • [x] 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.

avsingh999 avatar Oct 03 '17 20:10 avsingh999

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

aashutoshrathi avatar Oct 03 '17 20:10 aashutoshrathi

what's wrong in the code

avsingh999 avatar Oct 04 '17 11:10 avsingh999

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

Monal5031 avatar Oct 04 '17 12:10 Monal5031

now please check again what's wrong

avsingh999 avatar Oct 04 '17 14:10 avsingh999

@avsingh999 Make require changes in month.md

DivyeshPuri avatar Oct 04 '17 14:10 DivyeshPuri

@gitmate-bot rebase

aashutoshrathi avatar Oct 05 '17 18:10 aashutoshrathi

Comment on 9c41e4a5c5798af5bd462bf4d4a7f3afa9988f4f, 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()

aashutoshrathi avatar Oct 06 '17 07:10 aashutoshrathi

Comment on 3ace4a05346767a55ba9d62c35b775348a93c712, 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 avatar Nov 29 '17 05:11 aashutoshrathi

Comment on 3ace4a05346767a55ba9d62c35b775348a93c712, 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 avatar Nov 29 '17 05:11 aashutoshrathi

Comment on 04f39da5286aac6ca4c2aaf9626feb0a028905a4, 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 avatar Nov 29 '17 09:11 aashutoshrathi

Comment on 04f39da5286aac6ca4c2aaf9626feb0a028905a4, 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 avatar Nov 29 '17 09:11 aashutoshrathi

Comment on 04f39da5286aac6ca4c2aaf9626feb0a028905a4, 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 avatar Nov 29 '17 09:11 aashutoshrathi

Comment on 04f39da5286aac6ca4c2aaf9626feb0a028905a4, 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 avatar Nov 29 '17 09:11 aashutoshrathi

Comment on 04f39da5286aac6ca4c2aaf9626feb0a028905a4, 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
-    

aashutoshrathi avatar Nov 29 '17 09:11 aashutoshrathi