This file contains hidden or 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
| tot = 0 | |
| for i in range(int(input())): | |
| tot = tot + int(input()) | |
| print(tot) |
This file contains hidden or 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
| l=[] | |
| for i in range(int(input())):l.append(input()) | |
| y = [x for i,x in enumerate(l) if x not in l[:i]] | |
| for i in y:print(i) |
This file contains hidden or 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
| x = input().split(" ") | |
| y = [] | |
| for i in range(int(x[0])): | |
| y.append(i*int(x[1])) | |
| out = "" | |
| for i in y: | |
| out = out + str(i) | |
| out = out + " " | |
| print(out[:-1]) |
This file contains hidden or 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
| m = input() | |
| if "o" in m or "O" in m: | |
| print("true") | |
| else: | |
| print("false") |
This file contains hidden or 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
| n = int(input()) | |
| a = [] | |
| for i in range(n): | |
| a.append(input()) | |
| b = "".join(a) | |
| c = b.split("'") | |
| data = "" | |
| for key,val in enumerate(c): | |
| if key % 2 == 0: | |
| data+="".join(val.split()) |
This file contains hidden or 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
| site_count = int(input()) | |
| couple_count = int(input()) | |
| names = input().split() | |
| ids = input().split() | |
| minerals = input().split() | |
| data = [] | |
| for i in range(couple_count): | |
| data.append(input().split()) |
This file contains hidden or 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
| s = input().split(" ") | |
| a = [] | |
| for i in s: | |
| a.append(i[::-1]) | |
| print(" ".join(a)) |
This file contains hidden or 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
| if n%400==0:print("true") | |
| elif n%100==0:print("false") | |
| elif n%4==0:print("true") | |
| else:print("false") |
This file contains hidden or 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
| s1, s2 = input().split(" ") | |
| if sorted(s1) == sorted(s2): print("Anagram") | |
| else: print("Not Anagram") |
This file contains hidden or 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
| numbers = input().split(" ") | |
| j = [] | |
| for i in numbers: | |
| j.append(int(i)) | |
| count = 0 | |
| for i in j: | |
| if i < 0: | |
| count = count - 1 | |
| else: | |
| count = count + 1 |
OlderNewer