We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
it is working fine while running the code but it fails all the test case!!
can anyone tell me the problem.
!/bin/python3
import math
import os
import random
import re
import sys
if name == 'main':
nm = list(map(int,input().split()))
n = int(nm[0])
m = int(nm[1])
list1 = [x for x in range(n)]
print(m)
for i in range(n):
if i < (len(list1)-1):
print(list1[i+1],list1[i-1])
elif i >= (len(list1)-1):
i = -1
print(list1[i+1],list1[i-1])
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Diameter Minimization
You are viewing a single comment's thread. Return to all comments →
python3
it is working fine while running the code but it fails all the test case!! can anyone tell me the problem.
!/bin/python3
import math import os import random import re import sys
if name == 'main': nm = list(map(int,input().split()))