Problem p03386 (python)

Fixed submission:
import sys

a, b, k = map(int, sys.stdin.readline().split())

def main():
    if k >= b - a + 1:
        res = list(range(a, b+1))
    else:
        res = set(range(a, a+k)) | set(range(b, b-k, -1))
        res = sorted(res)
    return res

if __name__ == '__main__':
    ans = main()
    print(*ans, sep='\n')

Buggy submission (verdict: Runtime Error):
import sys
import math

def main():
    a, b, k = map(int, sys.stdin.readline().split())
    query_range = range(a, b + 1)
    
    query_range = list(query_range)
    print('なんだこのバグ')
    exit()

    if a == b:
        res = query_range
    elif k >= math.ceil((b - a + 1) / 2):
        res = query_range
    else:
        res = query_range[:k] + query_range[-k:]

    for i in res:
        print(i)
    
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
import math

def main():
    a, b, k = map(int, sys.stdin.readline().split())
    query_range = range(a, b + 1)
    
    query_range = list(query_range)
    print('aaa')
    exit()

    if a == b:
        res = query_range
    elif k >= math.ceil((b - a + 1) / 2):
        res = query_range
    else:
        res = query_range[:k] + query_range[-k:]

    for i in res:
        print(i)
    
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
import math

def main():
    a, b, k = map(int, sys.stdin.readline().split())
    a, b, k = int(a), int(b), int(k)
    query_range = list(range(a, b + 1))

    if a == b:
        res = query_range
    elif k >= math.ceil((b - a + 1) / 2):
        res = query_range
    else:
        res = query_range[:k] + query_range[-k:]

    for i in res:
        print(i)
    
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
import math

def main():
    a, b, k = map(int, sys.stdin.readline().split())
    query_range = list(range(a, b + 1))

    if a == b:
        res = query_range
    elif k >= math.ceil((b - a + 1) / 2):
        res = query_range
    else:
        res = query_range[:k] + query_range[-k:]

    for i in res:
        print(i)
    
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
import math

def main():
    a, b, k = [int(x) for x in sys.stdin.read().split()]
    query_range = list(range(a, b + 1))
    print(a, b)
    exit()
    if a == b:
        res = query_range
    elif k >= math.ceil((b - a + 1) / 2):
        res = query_range
    else:
        res = query_range[:k] + query_range[-k:]

    for i in res:
        print(i)
    
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
import math

def main():
    a, b, k = [int(x) for x in sys.stdin.readline().split()]
    print(a, b)
    query_range = list(range(a, b + 1))
    if a == b:
        res = query_range
    elif k >= math.ceil((b - a + 1) / 2):
        res = query_range
    else:
        res = query_range[:k] + query_range[-k:]

    for i in res:
        print(i)
    
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
import math

def main():
    a, b, k = [int(x) for x in sys.stdin.readline().split()]

    query_range = list(range(a, b + 1))
    print('aaa')
    sys.exit()
    if a == b:
        res = query_range
    elif k >= math.ceil((b - a + 1) / 2):
        res = query_range
    else:
        res = query_range[:k] + query_range[-k:]

    for i in res:
        print(i)
    
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
import math

def main():
    a, b, k = [int(x) for x in sys.stdin.readline().split()]

    query_range = list(range(a, b + 1))
    if a == b:
        res = query_range
    elif k >= math.ceil((b - a + 1) / 2):
        res = query_range
    else:
        res = query_range[:k] + query_range[-k:]
    print(query_range)
    sys.exit()
    # for i in res:
    #     print(i)
    
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
import math

def main():
    a, b, k = [int(x) for x in sys.stdin.readline().split()]
    
    query_range = list(range(a, b + 1))
    if a == b:
        res = query_range
    elif k >= math.ceil((b - a + 1) / 2):
        res = query_range
    else:
        res = query_range[:k] + query_range[-k:]
    
    for i in res:
        print(i)
    
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
import math

def main():
    a, b, k = [int(x) for x in sys.stdin.readline().split()]
    query_range = list(range(a, b + 1))
    if k >= math.ceil((b - a + 1) / 2):
        res = query_range
    #else:
        #res = query_range[:k] + query_range[-k:]
    
    for i in res:
        print(i)
    
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import sys
import math

def main():
    a, b, k = [int(x) for x in sys.stdin.readline().split()]
    query_range = list(range(a, b + 1))
    if k >= math.ceil((b - a + 1) / 2):
        res = query_range
    else:
        res = query_range[:k] + query_range[-k:]
    
    for i in res:
        print(i)
    
if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
#                         author:  kagemeka 
#                         created: 2019-11-07 02:35:07(JST)
import sys
# import collections
# import math
# import string
# import bisect
# import re
# import itertools
# import statistics
# import functools
# import operator

def main():
    a, b, k = (int(i) for i in sys.stdin.readline().split())
    ab = list(range(a, b+1))
    if k * 2 >= len(ab):
        res = ab
    else:
        res = ab[:k] + ab[-k:]
    for r in res:
        print(r)
    
if __name__ == "__main__":
    # execute only if run as a script
    main()

# 何故

Buggy submission (verdict: Runtime Error):
#                         author:  kagemeka 
#                         created: 2019-11-07 02:35:07(JST)
import sys
# import collections
# import math
# import string
# import bisect
# import re
# import itertools
# import statistics
# import functools
# import operator

def main():
    a, b, k = (int(i) for i in sys.stdin.readline().split())
    ab = list(range(a, b+1))
    if k * 2 >= len(ab):
        res = ab
    else:
        res = ab[:k] + ab[-k:]
    for r in res:
        print(r)


if __name__ == "__main__":
    # execute only if run as a script
    main()