Problem:


Score : 100 points

Problem Statement

This contest, AtCoder Beginner Contest, is abbreviated as ABC.

When we refer to a specific round of ABC, a three-digit number is appended after ABC. For example, ABC680 is the 680th round of ABC.

What is the abbreviation for the N-th round of ABC? Write a program to output the answer.

Constraints

100 ≤ N ≤ 999

Input

Input is given from Standard Input in the following format:

N

Output

Print the abbreviation for the N-th round of ABC.

Sample Input 1

100

Sample Output 1

ABC100

The 100th round of ABC is ABC100.

Sample Input 2

425

Sample Output 2

ABC425

Sample Input 3

999

Sample Output 3

ABC999



Sample input:
100


Sample output:
ABC100

Submission status: Runtime Error

Solution code:
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    n = i_input()

    print('ABC' + str(n))

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
n=int,input()
print('ABC'+n)

Submission status: Runtime Error

Solution code:
print("ABC{}".format(int(input()))

Submission status: Runtime Error

Solution code:
N = int(input())
x = 0
a = []
for i in range(2:N:2):
    while i % 2 == 0:
        i //= 2
        x += 1
    a.append(x)
    x = 0
a = sorted(a)
a = a[::-1]
print(a[0])

Submission status: Runtime Error

Solution code:
N = int(input())

while a*2 <= N:
    a = a*2

print(a)

Submission status: Runtime Error

Solution code:
N = input()
print(f'ABC{N}')

Submission status: Runtime Error

Solution code:
n, m = map(int, input().split())
P, M = ("POSSIBLE", "IMPOSSIBLE")
dic = {}
for _ in range(m):
    a, b = map(int, input().split())
    if dic.get(a) is None: dic[a] = [b]
    else: dic[a] = dic[a] + [b]
    if dic.get(b) is None: dic[b] = [a]
    else: dic[b] = dic[b] + [a]
if dic.get(n) is None: print(M) return
arr = dic[n]
for i in arr:
    if 1 in dic[i]: print(P) return
print(M)

Submission status: Runtime Error

Solution code:
n=int(input())
print("ABC"+n)

Submission status: Runtime Error

Solution code:
N = input()
print(ABC + "N")

Submission status: Runtime Error

Solution code:
N,M = map(int,input().split())
one = []
goal = []
for i in range(M):
    A,B = map(int,input().split())

    if A == 1 :
        one.append(B)
    elif B == 1:
        one.append(A)

    if A == N or B == N:
        goal.append(A)
        goal.append(B)

if set(goal) & set(one):
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

Submission status: Runtime Error

Solution code:
import sys
from collections import deque
from collections import defaultdict
import math
import copy
#input = sys.stdin.readline
sys.setrecursionlimit(20000000)
s = input()
print("ABC"+s1)

Submission status: Runtime Error

Solution code:
n=input()
print(n[3]+n[4]+n[5])

Submission status: Runtime Error

Solution code:
N = int(input())

print('ABC'+ N)

Submission status: Runtime Error

Solution code:
N = int(input())

print('ABC'+ N, end='')

Submission status: Runtime Error

Solution code:
n = input()
ptint('ABC'+n)

Submission status: Runtime Error

Solution code:

def main():
    n = input()
    print(f'ABC{n}')

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:

def main():
    print(f'ABC{input()}')

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
N=int(input())
print('ABC'+N)

Submission status: Runtime Error

Solution code:
a=input()
print("ABC"+int(a))

Submission status: Runtime Error

Solution code:
n, m = map(int, input().split())
print((n-1)*(m-1))

Submission status: Runtime Error

Solution code:
n = int(input())
print('ABC'+n)

Submission status: Runtime Error

Solution code:
s=int(input())
print('ABC'+s)

Submission status: Runtime Error

Solution code:
N = int(input())
if n==1:
    print('1')
else:
    for i in N:
        if 2**i <= N and 2**(i+1) > N:
            print(2**i)
            break




#プログラム終了
#import sys
#sys.exit()

#a**b　aのb乗

Submission status: Runtime Error

Solution code:
N = input(int())
ans = 64

if ans > N:
  ans /= 2

print(int(ans))

Submission status: Runtime Error

Solution code:
n=raw_input()
print [ABC+n]

Submission status: Runtime Error

Solution code:
n = int(input())

print("ABC" + n)

Submission status: Runtime Error

Solution code:
N=str(inputN=input()
print('ABC{}'.format(N))

Submission status: Runtime Error

Solution code:
print("ABC"+inpit())

Submission status: Runtime Error

Solution code:
fn main() {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    println!("ABC{}", s.trim())
}

Submission status: Runtime Error

Solution code:
N = int(input())
# res = [x for x in range(1, N + 1)]
result = {}
# for i in res:
for i in range(1, N + 1):
    result[i] = 0
    tmp = i
    while True:
        if tmp % 2 == 0:
            tmp = tmp / 2
            result[i] += 1
        else:
            break
print(sorted(result.items(), key=lambda x: -x[1])[0][0]

Submission status: Runtime Error

Solution code:
n = input()
print(f"ABC{n}")

Submission status: Runtime Error

Solution code:
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(readline())

print('ABC' + N)

Submission status: Runtime Error

Solution code:
n = int(input())

print('ABC' + n)

Submission status: Runtime Error

Solution code:
N = int(input())

print('ABC' + N)

Submission status: Runtime Error

Solution code:
number = int(input)
print("ABC" + str(number))

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())
ab = [sorted(list(map(int, input().split()))) for _ in range(M)]

fst = []

for i in ab:
  if i[0]==1:
    fst.append(i[1])

for i in ab:
  for j in fst:
    if set(i) == set([j, N]):
      print("POSSIBLE")
      exit()
print("IMPOSSIBLE")

Submission status: Runtime Error

Solution code:
a=int(input())
cnt=0
for i in range(math.inf):
  if a%2==0:
    cnt+=1
    a=a/2
  else:
    print(cnt)
    break

Submission status: Runtime Error

Solution code:
n = (input()
print('ABC'+n)

Submission status: Runtime Error

Solution code:
NN=str(input())
print("ABC"+N)

Submission status: Runtime Error

Solution code:
n,m=map(int,input().split())
a=[[int(i) for i in input().split()] for j in range(m)]
a.sort(key=lambda x:x[1])
a.sort(key=lambda x:x[0])
cc=0
for i in range(m):
    if a[i][0]==1:
        for j in range(i,m):
            if a[i][1]==a[j][0] and a[j][1]==n:
                cc=1
                break
    if cc==1:
        break
print("POSSIBLE" if cc==1 else "IMPOSSIBLE")

Submission status: Runtime Error

Solution code:
print("ABC"+str(input())

Submission status: Runtime Error

Solution code:
print('ABC' + input())print('ABC' + input())

Submission status: Runtime Error

Solution code:
print("ABC" + int(input()) )

Submission status: Runtime Error

Solution code:
# , = map(int, input.split())
#  = int(input())

n = input()
print(ABC{}.format(n))

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
L = list(map(int, input().split()))

L = sorted(L, reverse=True)

print(sum(L[:K]))

Submission status: Runtime Error

Solution code:
import sys
import os

f = open("C:/Users/user/Documents/atCoderProblem/import.txt","r")
sys.stdin = f

# -*- coding: utf-8 -*-

n = input()

print("ABC" + n)

Submission status: Runtime Error

Solution code:
n = (int)raw_input()
print "ABC" + (str)n

Submission status: Runtime Error

Solution code:
N = int(input())
print(f"ABC{N}")

Submission status: Runtime Error

Solution code:
n=input()
  print('ABC'+n)

Submission status: Runtime Error

Solution code:
print('ABC'+N)

Submission status: Runtime Error

Solution code:
print("ABC" + int(input()))

Submission status: Runtime Error

Solution code:
ソースコード 拡げる

Copy
Copy
N = int(input())
count = 0
for i in range(N):
    c = 2**count
    if c > N:
        print(c//2)
        exit()
    else:
        count +=1

Submission status: Runtime Error

Solution code:
a =input()
b =ABC+a
print(b)

Submission status: Runtime Error

Solution code:

N,M = list(map(int,input().split()))
path = [[False,False] for i in range(N)]
flag=False
for i in range(M):
    a,b = list(map(int,input().split()))
    if a=N-1:
        if path[b-1][0]:
            flag=True
            
        path[b-1][1]=True
    if a=0:
        if path[b-1][1]:
            flag=True
            
        path[b-1][0]=True
    if b=N-1:
        if path[a-1][0]:
            flag=True
            
        path[a-1][1]=True
    if b=0:
        if path[a-1][1]:
            flag=True
            
        path[a-1][0]=True

if flag:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

Submission status: Runtime Error

Solution code:
N=readline()
print("ABC"*N)

Submission status: Runtime Error

Solution code:
import bisect
N, M = map(int, input().split())
a = [None for i in range(2 * M)]
number = [None for i in range(2 * M)]
flag = 0
for i in range(M):
    A, B = map(int, input().split())
    a[2*i] = [A, B]
    a[2*i+1] = [B, A]
    number[2*i]
    number[2*i+1]
a.sort()
b = a[:]
b.reverse()
one = []
two = []
for i in range(M):
    if a[i][0] == 1:
        one.append(a[i][1])
    else:
        break

for i in range(M):
    if b[i][0] == N:
        two.append(b[i][1])
    else:
        break
def intersect_list(lst1, lst2):
    arr = []
    lst = lst1.copy()
    for element in lst2:
        try:
            lst.remove(element)
        except ValueError:
            pass
        else:
            arr.append(element)
    return arr
if len(intersect_list(one, two)) != 0:
    print("POSSIBLE")

else:
    print("IMPOSSIBLE")

Submission status: Runtime Error

Solution code:
print("ABC{0}".format(intput()))

Submission status: Runtime Error

Solution code:
N = int(iput())
if N < 100:
    ans = '0' + str(N) + 'ABC'
else:
    ans = str(N) + 'ABC'
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())

print("ABC" + N)

Submission status: Runtime Error

Solution code:
s=input()
print("ABC"+f"{s}")

Submission status: Runtime Error

Solution code:

a, b, c = map(int, input().split())
print("YES" if b - a == c - b else "NO")

Submission status: Runtime Error

Solution code:
#68a
n=input()
pritn('ABC'+n)

Submission status: Runtime Error

Solution code:
print("ABC" ++ input())

Submission status: Runtime Error

Solution code:
i = int(input())
print("ABC"i)

Submission status: Runtime Error

Solution code:
i = int(input())
print("ABC"+i)

Submission status: Runtime Error

Solution code:
print('ABC' input())

Submission status: Runtime Error

Solution code:
n = int(input())

print("ABC" + n)

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <algorithm>
using namespace std;

int main(){
int inp; cin >> inp;
cout << "ABC"<< inp << endl;
}

Submission status: Runtime Error

Solution code:
S = raw_input()
print "ABC",S

Submission status: Runtime Error

Solution code:
a = raw_input()

people = 0
for i in range(int(a)):
  number_list = raw_input().split()
  people += int(number_list[1])-int(number_list[0]) +1
  
print(str(people))

Submission status: Runtime Error

Solution code:
a = raw_input()

people = 0
for i in range(int(a)):
  number_list = raw_input().split()
  people += int(number_list[1])-int(number_list[0]) +1
  
print(people)

Submission status: Runtime Error

Solution code:
N = raw_input("Please enter something: ")

return("ABC" + str(N))

Submission status: Runtime Error

Solution code:
print("ABC{0}".format(input())

Submission status: Runtime Error

Solution code:
a = int(input())
print("ABC"+a)

Submission status: Runtime Error

Solution code:
print(f'ABC' + input())

Submission status: Runtime Error

Solution code:
a=input()
print('ABC'　+a)

Submission status: Runtime Error

Solution code:
a=input()
print('ABC'a)

Submission status: Runtime Error

Solution code:
a=input()
print(ABC)
print(a)

Submission status: Runtime Error

Solution code:
a=imput()
print(ABC)
print(a)

Submission status: Runtime Error

Solution code:
N, M = map(int, raw_input().split())
a={}
b={}
for i in range(M):
    k,l=map(int, raw_input().split())
    if k==1:
        a.add(k)
    if l==N:
        b.add(l)
if a&b:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

Submission status: Runtime Error

Solution code:
N, M = map(int, raw_input().split())
a={}
b={}
for i in range(M):
    k,l=a.append(map(int, raw_input().split()))
    if k==1:
        a.add(k)
    if l==1: 
        b.add(l)
if a&b: 
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

Submission status: Runtime Error

Solution code:
l = list(map(int, input().split()))
print("ABC"+l[0])

Submission status: Runtime Error

Solution code:
in=input("")
print("ABC{}".format(in))

Submission status: Runtime Error

Solution code:
in=input()
print("ABC{}".format(in))

Submission status: Runtime Error

Solution code:
n=int(raw_input())
print "ABC"+n

Submission status: Runtime Error

Solution code:
#!usr/bim/python
#! -*- coding: utf-8 -*-


n_m = raw_input()
n,m = n_m.split()

#n = int(n)
m = int(m)

shima_1_list = []
shima_2_list = []

i = 0
while i < m:
    teikibin = raw_input()
    teikibin = teikibin.split()
    if teikibin[0] == "1":
        shima_1_list.append(teikibin[1])
    elif teikibin[1] == n:
        shima_2_list.append(teikibin[0])
    i += 1

status = 0

for shima_1 in shima_1_list:
    if shima_1 in shima_2_list:
        status = 1

if status == 0:
    print "IMPOSSIBLE"
else:
    print "POSSIBLE"

Submission status: Runtime Error

Solution code:
uk3zdbr9

Submission status: Runtime Error

Solution code:
N = int(input())
arr = [i for i in range(1, N + 1)]
# N == len(arr)
nums = N*[0]
for j in range(N):
    target = arr[j]
    num = 0
    while target % 2 == 0:
        num += 1
        target /= 2
    nums[j] = num

max_index = 0
for k in range(N):
    if nums[k] > max:
        max_index = k

print(arr[max_index])

Submission status: Runtime Error

Solution code:
#!/usr/bin
# -*- coding="utf-8" -*-

a = raw_input()
print ("ABC" + a )

Submission status: Runtime Error

Solution code:
N, M = map(int, input().split())
 
arr = []
i = 0
for i in range(M):
    append = arr.append
    t = list(map(int, input().split(" ")))
    append(t)
p1 = [x for x in arr if x[0] == 1]
p2 = [x for x in arr if x[1] == N]

ii = 0
iii = 0
r = 0
for ii in p1:
    for iii in p2:
        if iii[0] == ii[1]:
            r = 1
            break
 
if (r != 0):
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

Submission status: Runtime Error

Solution code:
N,M=[int(i) for i in input().split()]
a=[]
b=[]
c=[]
for i in range(M):
    x,y=[int(i) for i in input().split()]
    if x==1 :
        c.append(y)
    if y==N:
        c.append(x)
if len(c)==len(set(c)):
    print("IMPOSSIBLE")
else:
    print("POSSIBLE")

Submission status: Runtime Error

Solution code:
N,M=[int(i) for i in input().split()]
a=[]
b=[]
c=[]
flag=False
for i in range(M):
    x,y=map(int,input().split())
    a.append(x)
    b.append(y)
    if x==1:
        c.append(y)
for i in range(M):
    if b[i]==N:
        flag=a[i] in c

if flag==False:
    print("IMPOSSIBLE")
else:
    print("POSSIBLE")

Submission status: Runtime Error

Solution code:
n, m = (int(i) for i in input().split())
island = [[] for i in range(n)]

for i in range(m):
    a, b = (int(i)-1 for i in input().split())
    if a == 0:
        island[a].append(b)
    elif a == n-1:
        island[n-1].append(b)
    elif b == 0:
        island[b].append(a)
    elif b == n-1:
        island[n-1].append(a)

ans = "IMPOSSIBLE"
for i in island[0]:
    if i in island[n-1]:
        ans = "POSSIBLE"
        break

print(ans)

Submission status: Runtime Error

Solution code:
n, m = (int(i) for i in input().split())
island = [[] for i in range(n)]

for i in range(m):
    a, b = (int(i)-1 for i in input().split())
    if a == 0:
        island[a].append(b)
    elif a == n-1:
        island[n-1].append(b)
    elif b == 0:
        island[b].append(a)
    elif b == n-1:
        island[n-1].append(a)

print(island)
ans = "IMPOSSIBLE"
for i in island[0]:
    if i in island[n-1]:
        ans = "POSSIBLE"
        break

print(ans)

Submission status: Runtime Error

Solution code:
import sys
l = raw_input().split()
N = int(l[0])
M = int(l[1])
nlist = []
list1 = []
for i in range(0, M):
    tmp = raw_input().split()
    a = int(tmp[0])
    b = int(tmp[1])
    if a == 1:
        list1.append(b)
        continue
    if b == N:
        nlist.append(a)
        continue
matched_list = list(set(list1) & set(nlist))
if len(matched_list) != 0:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')

Submission status: Runtime Error

Solution code:
import sys
l = raw_input().split()
N = int(l[0])
M = int(l[1])
nlist = []
list1 = []
for i in range(0, M):
    tmp = raw_input().split()
    a = int(tmp[0])
    b = int(tmp[1])
    if a == 1:
        list1.append(b)
        continue
    if b == N:
        nlist.append(a)
        continue
matched_list = list(set(list1) & set(nlist))
if len(matched_list) == 0:
    print('IMPOSSIBLE')
else:
    print('POSSIBLE')

Submission status: Runtime Error

Solution code:
import sys
l = raw_input().split()
N = int(l[0])
M = int(l[1])
nlist = []
list1 = []
flag = True
for i in range(0, M):
    tmp = raw_input().split()
    a = int(tmp[0])
    b = int(tmp[1])
    if a == 1:
        list1.append(b)
        continue
    if b == N:
        nlist.append(a)
        continue
matched_list = list(set(list1) & set(nlist))
if len(matched_list) == 0:
    print('IMPOSSIBLE')
else:
    print('POSSIBLE')

Submission status: Runtime Error

Solution code:
def solve():
  N = input()
  
  print ('ABC') + N

if __name__ == '__main__':
    solve()

Submission status: Runtime Error

Solution code:
d={}
n,m = map(int,input().split())
for _ in range(m):
    i,j = map(int,input().split())
    if j in d:
        d[j].append(i)
    else:
        d[j]=[i]
flag=0
if n in d:
    for item in d[n]:
        if item in d and 1 in d[item]:
            flag=1
            break
print('POSSIBLE' if flag else 'IMPOSSIBLE')

Submission status: Runtime Error

Solution code:
#!/usr/bin/python

from sets import Set
import sys

def main(argv):
    line = sys.stdin.readline()
    while line:
        N, M = map(lambda x: int(x), line.split(" ", 2))

        services_1 = Set([])
        services_n = []
        for i in xrange(M):
            a, b = map(lambda x: int(x), sys.stdin.readline().split(" ", 2))
            if a == 1:
                services_1.add(b)
            if b == N:
                services_n.append(a)

        if 1 in services_n:
            print("POSSIBLE")

        result = "IMPOSSIBLE"
        for service in services_n:
            if service == 1 or service in services_1:
                result = "POSSIBLE"
                break
        print result                

        line = sys.stdin.readline()

if __name__ == "__main__":
    main(sys.argv)

Submission status: Runtime Error

Solution code:
input_N = input()
if 100>input_N and 900<input_N;
  sys.exit()

print ('ABC') + input_N

Submission status: Runtime Error

Solution code:
input_N = input('>>'  )

print ('ABC') + input_N

Submission status: Runtime Error

Solution code:
#!/usr/bin/python

import sys

def main(argv):
    line = sys.stdin.readline()
    while line:
        N, M = map(lambda x: int(x), line.split(" ", 2))

        services_1 = set()
        services_n = []
        for i in xrange(M):
            a, b = map(lambda x: int(x), sys.stdin.readline().split(" ", 2))
            if a == 1:
                services_1.add(b)
            if b == N:
                services_n.append(a)

        if 1 in services_n:
            print("POSSIBLE")

        result = "IMPOSSIBLE"
        for service in services_n:
            if service == 1 or service in services_1:
                result = "POSSIBLE"
                break
        print result                

        line = sys.stdin.readline()

if __name__ == "__main__":
    main(sys.argv)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import itertools
import sys

ships = []
N, M = [int(x) for x in input().split()]
for i in range(M):
    ships.append([int(x) for x in input().split()])

from_1 = set([ship[1] for ship in ships if ship[0] == 1])
to_N = set([ship[0] for ship in ships if ship[1] == N])

if from_1 & to_N:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

Submission status: Runtime Error

Solution code:
n, m = [int(x) for x in input().split()]
isl = []
mark = [False] * n
l = [0] * n
for i in range(n):
    isl.append([])
for i in range(m):
    a, b = [int(x) for x in input().split()]
    isl[a - 1].append(b - 1)
    isl[b - 1].append(a - 1)
 
q = []
q.append(0)
found = False
while len(q):
    v = q.pop()
    mark[v] = True
    for child in isl[v]:
        if not mark[child]:
            l[child] = l[v] + 1
            q.append(child)
print("POSSIBLE" if (l[n - 1] == 2 or l[n - 1] == 1) else "IMPOSSIBLE")

Submission status: Runtime Error

Solution code:
a=[1,2,4,8,16,32,64,128]
n=int(input())
i=0
while a[i]<=n:
    i+=1
print(a[i-1])

Submission status: Runtime Error

Solution code:
a=[1,2,4,8,16,32,64,128]
n=int(input())
i=0
while a[i]<=n:
    i+=1
print(a[i-1] if i>0 else 0)

Submission status: Runtime Error

Solution code:
    a=[1,2,4,8,16,32,64,128]
    n=int(input())
    i=0
    while a[i]<=n:
        i+=1
    print(a[i-1] if i>0 else 0)

Submission status: Runtime Error

Solution code:
n = input()
print(int(n[3:]))