Problem:


Score : 100 points

Problem Statement

A programming competition site AtCode regularly holds programming contests.

The next contest on AtCode is called ABC, which is rated for contestants with ratings less than 1200.

The contest after the ABC is called ARC, which is rated for contestants with ratings less than 2800.

The contest after the ARC is called AGC, which is rated for all contestants.

Takahashi's rating on AtCode is R. What is the next contest rated for him?

Constraints

0 ≤ R ≤ 4208

R is an integer.

Input

Input is given from Standard Input in the following format:

R

Output

Print the name of the next contest rated for Takahashi (ABC, ARC or AGC).

Sample Input 1

1199

Sample Output 1

ABC

1199 is less than 1200, so ABC will be rated.

Sample Input 2

1200

Sample Output 2

ARC

1200 is not less than 1200 and ABC will be unrated, but it is less than 2800 and ARC will be rated.

Sample Input 3

4208

Sample Output 3

AGC



Sample input:
1199


Sample output:
ABC

Submission status: Wrong Answer

Solution code:
S = input()


MOD = 10**9 + 7

# time complexity: O(|S|)
def dp(S):
    dp = [[0] * 4 for _ in range(len(S) + 1)]
    dp[len(S)][3] = 1
    for i in range(len(S))[::-1]:
        dp[i][3] = 3 * dp[i + 1][3] if S[i] == "?" else dp[i + 1][3]
        dp[i][3] %= MOD
        if S[i] == "?":
            dp[i][0] = (3 * dp[i + 1][0] + dp[i + 1][1]) % MOD
            dp[i][1] = (3 * dp[i + 1][1] + dp[i + 1][2]) % MOD
            dp[i][2] = (3 * dp[i + 1][2] + dp[i + 1][3]) % MOD
        else:
            dp[i][0] = (dp[i + 1][0] + int(S[i] == "A") * dp[i + 1][1]) % MOD
            dp[i][1] = (dp[i + 1][1] + int(S[i] == "B") * dp[i + 1][2]) % MOD
            dp[i][2] = (dp[i + 1][2] + int(S[i] == "C") * dp[i + 1][3]) % MOD
    print(dp[0][0])


# time complexity: O(|S|)
def focus_on_B(S):
    cuml = {"A": [], 
            "C": [],
            "?": []}
    current_nums = {"A": 0,
                    "C": 0,
                    "?": 0}
    for char in S:
        if char in cuml.keys():
            current_nums[char] += 1
        for key in cuml.keys():
            cuml[key].append(current_nums[key])

    # num_combinations[i]: i番目をBとした時に、可能な組み合わせの数
    num_combinations = [0] * len(S)
    for i in range(1, len(S) - 1):
        if S[i] in {"B", "?"}:
            A_L = cuml["A"][i-1]
            Q_L = cuml["?"][i-1]
            C_R = cuml["C"][-1] - cuml["C"][i]
            Q_R = cuml["?"][-1] - cuml["?"][i]
            num_combinations[i] = ((A_L * 3 + Q_L) * int(3**(Q_L - 1))\
                                * (C_R * 3 + Q_R) * int(3**(Q_R - 1))) % MOD
        else:
            continue
    print(sum(num_combinations) % MOD)

focus_on_B(S)

Submission status: Wrong Answer

Solution code:
0

Submission status: Wrong Answer

Solution code:
import re;print("AC"if re.match("A[a-z]+C[a-z]+",input())else"WA")

Submission status: Wrong Answer

Solution code:
import re
s = input()
pattern = r'^A\w[a-z][a-z]*C{1}[a-z]*[a-z]$'
if re.match(pattern,s):
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
str = str(input())

a = str [0:1] 
b = str[2:-1]


if a != "A":
 print ("WA")

elif b.count("C") !=1:
 print ("WA")

elif str[1:2] .isupper() :
 print ("WA")

elif str[-1:] .isupper():
 print ("WA")

else :
 print ("AC")

Submission status: Wrong Answer

Solution code:
l = list(input())
length = len(l)

a = 0
for i in range(2,length-1):
    if l[i] == "C":
        a += 1
        
b = 0
for i in range(length):
    if l[i].isupper() == True:
        b += 1

if l[0] == "A":
    if a == 1:
        if b == 2:
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = input()

if S[2:-2].count('C') != 1:
  print('WA')
else:
    if S[0] != 'A':
      print('WA')
    else:
        S = list(map(lambda x: x, S))
        S[0] = 'a'
        S[S[2:-2].index('C')+2] = 'c'
        if ''.join(S).islower():
          print('AC')
        else:
          print('WA')

Submission status: Wrong Answer

Solution code:
s=input()
if s[0:1]!='A':
  print('WA')
  exit()
t=s[2:len(s)-1]
countc=0
for i in range(len(t)):
  if t[i]=='C':
    countc+=1
if countc!=1:
  print('WA')
  exit()
for i in range(1,len(s)):
  if s[i:i+1]!='C' and s[i:i+1].isupper():
    print('WA')
    exit()
print('AC')

















for i in range(100*d):
  for j in range(d):
    if i+1==p[j]:
      tugi=max(tugi,j+1+c[j])
    elif i+1<p[j]:
      tugi=max(tugi,j+1)
  ten+=tugi
  tugi=0
  print(ten)
  if ten>=g:
    print(i+1)
    exit()

Submission status: Wrong Answer

Solution code:
S=raw_input();l=len(S);f=S.find('C');A=0
if S[:1]=='A':
	A+1
	S="a"+S[1:]
if S[2:l-1].count('C')==1:
	A+1
	S=S[:f]+'c'+S[f+1:]
if S.islower():
	A+1
print('AC'if A==3 else'WA')

Submission status: Wrong Answer

Solution code:
S = input()

if S[2:-2].count('C') != 1:
  print('WA')
else:
    if S[0] != 'A':
      print('WA')
    else:
        S[0] == 'a'
        S[S[2:-2].index('C')+2] == 'c'

        if S.islower():
          print('AC')
        else:
          print('WA')

Submission status: Wrong Answer

Solution code:
s=input()

a=0
ab=0
abc=0
q=0

#if s[0]=="A" :
#  a=1
#elif s[0]=="?":
#  a=1
#  q=1
#print(str(a)+" "+str(ab)+" "+str(abc)+" "+str(q))

for i in range(len(s)):
  if s[i]=="A":
    a=a+3**q
  elif s[i]=="B":
    ab=ab+a
  elif s[i]=="C":
    abc=abc+ab
  elif s[i]=="?":
    abc=abc*3+ab
    
    ab=ab*3+a
    a=a*3
    
    a=a+3**q
    q+=1
  #print(str(a)+" "+str(ab)+" "+str(abc)+" "+str(q))
    
print(abc%(10**9+7))

Submission status: Wrong Answer

Solution code:
S = raw_input()
l=len(S)
if S[:1] == 'A':
	AC = 1
	S = "a"+S[1:]
else:
	AC = 0
if S[2:l-1].count('C')==1:
	AC2 = 1
else:
	AC2 = 0
if S.find('C')>=2:
	S = S[:S.find('C')] + 'c' + S[S.find('C')+1:]
if S.islower():
	AC3 = 1
else:
	AC3 = 0
if AC+AC2+AC3 == 3:
	print 'AC'
else:
	print 'WA'

Submission status: Wrong Answer

Solution code:
import copy

def main():
    string = input()
    str_list = list(string)
    if str_list[0] == "A":
        cnt = 0
        index = 0
        for i in range(2, len(str_list)-1):
            if str_list[i] == "C":
                cnt += 1
                index = i
        if cnt == 1:
            str_list[0] = "a"
            str_list[index] = "c"
            str_changed = "".join(str_list)
            if str_changed.islower():
                print("AC")
            else:
                print("WA")
        else:
            print("WA")

    else:
        print("WA")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
R = int(input())
if R <= 1199:
    print('ABC')
elif R <= 2800:
    print('ARC')
else:
    print('AGC')

Submission status: Wrong Answer

Solution code:
s = list(input())
l = len(s)
if s[0] == 'A':
    c_cnt = 0
    cn_l = []
    for i, m in enumerate(s):
        if 1<i<l-1 and m=='C':
            cn_l.append(i)
            c_cnt += 1
    if c_cnt == 1:
        cn = int(cn_l[0])
        tmp = s
        tmp.pop(0)
        tmp.remove('C')
        tmp_s = ''.join(tmp)
        if tmp_s == tmp_s.lower():
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s = input()
def kai(s):
    if s[0] == "A":
        if "C" in s[2:-1]:
            if s.count("C") == 1:
                s = s.replace("A", "")
                s = s.replace("C", "")
                if s.islower():
                    print("AC")
                else:
                    print("WA")
            else:
                print("WA")
        else:
            print("WA")
    else:
        print("WA")
 
kai(s)

Submission status: Wrong Answer

Solution code:
s=input()
if s[0]=='A':
    if s[2:-1].count('C')==1:
        if (s[1]+s[2:-1].replace('C', '')+s[-1]).islower() :
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
s=input()
if s[0]=='A':
    if s[2:-2].count('C')==1:
        if (s[1]+s[2:-1].replace('C', '')+s[-1]).islower() :
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
letters = input()
C = letters[2:-2]
D = letters.replace("A","a").replace("C","c")

print(D)
if letters[0] == "A" and C.count("C") == 1 and D.islower() == True  :
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
a = int(input())

if a < 1200:
	print ('ABC')
elif a <= 2800:
	print('ARC')
else:
	print ('AGC')

Submission status: Wrong Answer

Solution code:
s=input()
if s[0]=='A':
    if s[2:-2].count('C')==1:
        if (s[1]+s[2:-2].replace('C', '')+s[-1]).islower()=='True' :
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
S = str(input())
flag = False
 
if S.startswith("A"):
  if ((S[2]) == "C") ^ (S[-2]=="C"):
    index = S.find("C")
    if (S[1:index] + S[index+1:]).islower():
      flag = True
      
if flag == True:
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s=input()
result=""
count=0
l=len(s)
if s[0]!="A":
  result="WA"
elif ord(s[1:2])<97 or ord(s[l-1])<97:
  result="WA"
for i in s[2:l-1]:
  if ord(i)<97:
    count+=1
  if count>1 or i!="C":
    result="WA"
    break
if count==0:
  result="WA"
if result!="WA":
  result="AC"
print(result)

Submission status: Wrong Answer

Solution code:
import copy

def main():
    string = input()
    if string[0] == "A":
        cnt = 0
        index = 0
        for i in range(2, len(string)-1):
            if string[i] == "C":
                cnt += 1
                index = i
        if cnt == 1:
            cp_str = copy.copy(string)
            print(string[1:1])
            if index == 2:
                string = "a" + string[1:index] + "c" + string[index+1:]
            else:
                string = "a" + string[1:index-1] + "c" + string[index+1:]
            print(string)
            if string == cp_str.lower():
                print("AC")
            else:
                print("WA")
        else:
            print("WA")
    else:
        print("WA")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
print('AC')

Submission status: Wrong Answer

Solution code:
R = int(input())

if 0<=R<1200:
 print ("ABC")

if 1200<=R<2800:
 print ("ARC")

if 2800<=R<4208:
 print ("AGC")

Submission status: Wrong Answer

Solution code:
s=input()
if s[0]=='A':
    if s[2:-2].count('C')==1:
        if (s[1]+s[2:-2].replace('C', '')+s[-1]).islower() :
            print('AC')
        else:
            print('WA')
    else:
        print('WA')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
s = input()
flag = True
c = 0
if s[0] != "A":
    flag = False
else:
    s = list(s)
    s[0] = "A"
    s = "".join(s)
    for i in range(2, len(s)-1):
        if s[i] == "C":
            s = list(s)
            s[i] = "c"
            s = "".join(s)
            c += 1
    if c != 1:
        flag = False
    else:
        t = s.lower()
        if t != s:
            flag = False



if flag:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
s = input()
count = 0
for i in range(len(s)):
    if i == 0:
        if s[i] != 'A':
            break
    elif i == 1:
        if s[i].islower():
            pass
        else:
            break
    elif i>1 and i < len(s)-1 :
        if s[i]=='C':
            if count == 0:
                count += 1
            else:
                break
        elif s[i].islower():
            pass
        else:
            break
    elif i == len(s)-1 :
        if s[i].islower():
            print("AC")
            exit()
    else:
        break
print("WA")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
s = input()
flag = True
c = 0
if s[0] != "A":
    flag = False
else:
    s = list(s)
    s[0] = "A"
    s = "".join(s)
    for i in range(2, len(s)-1):
        if s[i] == "C":
            s = list(s)
            s[i] = "c"
            s = "".join(s)
            c += 1
    if c != 1:
        flag = False
    else:
        t = s.lower()
        if t == s:
            flag = False



if flag:
    print("AC")
else:
    print("WA")

Submission status: Wrong Answer

Solution code:
import copy

def main():
    string = input()
    if string[0] == "A":
        cnt = 0
        index = 0
        for i in range(2, len(string)-1):
            if string[i] == "C":
                cnt += 1
                index = i
        if cnt == 1:
            cp_str = copy.copy(string)
            string = "a" + string[1:index-1] + "c" + string[index+1:]
            print(string)
            print(cp_str)
            if string == cp_str.lower():
                print("AC")
            else:
                print("WA")
        else:
            print("WA")
    else:
        print("WA")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
s = input()
if len(s) < 4:
    print('WA')
    exit()
count = 0
for i in range(len(s)):
    if i == 0:
        if s[i] != 'A':
            break
    elif i == 1:
        if s[i].islower():
            continue
        else:
            break
    elif i>1 and i < len(s)-1 :
        if s[i]=='C':
            if count == 0:
                count += 1
                continue
            else:
                break
        elif s[i].islower():
            continue
        else:
            break
    elif i == len(s) :
        if s[i].islower():
            print("AC")
            exit()
    else:
        break
print("WA")

Submission status: Wrong Answer

Solution code:
S=input()
if S[0]=="A" and S[2:-2].count("C")==1:
  print("AC")
else:
  print("WA")

Submission status: Wrong Answer

Solution code:
s=input()
if s[0]=='A':
  if s[2:-2].count('C')==1:
    if (s[1]+s[2:-2].replace('C', '')+s[-1]).islower() :
      print('AC')
else:
  print('WA')

Submission status: Wrong Answer

Solution code:
S = input()
S1 = list(S)

if S1[0] == 'A' and S1[2:-1].count('C') == 1 and not(S[1] == 'C' or S[-1] == 'C'):
    print('AC')
else:
    print('WA')

Submission status: Wrong Answer

Solution code:
R = int(input())
if R >= 2800:
    print("AGC")
elif R >= 1200:
    print("AGC")
else:
    print("ABC")

Submission status: Wrong Answer

Solution code:
a=int(input())
if a<2800:
	print("ABC")
else:
	print("ARC")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

r = raw_input()
if r<=1199:
    print'ABC'
elif r<=2799:
    print'ARC'
else:
    print'AGC'

Submission status: Wrong Answer

Solution code:
r = int(input())

if r < 1200:
    print("ABC")
elif 1200 <= r < 2400:
    print("ARC")
else:
    print("AGC")

Submission status: Wrong Answer

Solution code:
x = int(input())
if x<=1200:
	print('ABC')
elif x<=2800:
	print('ARC')
else:
	print('AGC')

Submission status: Wrong Answer

Solution code:
r = raw_input()
if r<1200:
    print"ABC"
elif r<2800:
    print"ARC"
else:
    print"AGC"

Submission status: Wrong Answer

Solution code:
N = int(input())

if N < 1200:
    print("ABC")
if N >= 1200 and N < 2800:
    print("ARC")
else:
    print("AGC")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

a = raw_input()
if a<1200:
    print "ABC"
elif a<2800:
    print"ARC"
else:
    print"AGC"

Submission status: Wrong Answer

Solution code:
r = int(input())
if r<1200:
    print("ABC")
elif r<2400:
    print("ARC")
else:
    print("AGC")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

a = raw_input()
if a<1200:
    print "ABC"
elif a<2800:
    print"ARC"
else:
    print"ARC"

Submission status: Wrong Answer

Solution code:
R = int(input())
if R < 1200:
    print('ABC')
elif R < 1800:
    print('ARC')
else:
    print('AGC')

Submission status: Wrong Answer

Solution code:
R = int(input())

if 2800 < R:
    print("AGC")
elif 1200 <= R and R < 2800:
    print("ARC")
else:
    print("ABC")

Submission status: Wrong Answer

Solution code:
#coding: utf-8

r = int(raw_input(""))

if r <= 1200: print "ABC"
elif r <= 2800: print "ARC"
else: print "AGC"

Submission status: Wrong Answer

Solution code:
inputs = input()
R = int(inputs)

if R < 1200:
    print("ARC")
elif R < 2800:
    print("ARC")
else:
    print("AGC")

Submission status: Wrong Answer

Solution code:
r = int(input())
if r < 1200:
    print("ABC")
elif r < 200:
    print("ARC")
else:
    print("AGC")

Submission status: Wrong Answer

Solution code:
#-*-coding:utf-8-*-

def main():
    r = int(input())
    if r < 2000:
        print('ABC')
    elif r >= 1200 and r < 2800:
        print('ARC')
    else:
        print('AGC')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
print("AGC")

Submission status: Accepted

Solution code:
R = int(input())
if R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
else:
    print('AGC')

Submission status: Accepted

Solution code:
a = int(input())
if a < 1200:
  print("ABC")
elif a < 2800:
  print("ARC")
else:
  print("AGC")

Submission status: Accepted

Solution code:
R = int(input())

if R < 1200:
    print("ABC")
elif R < 2800:
    print("ARC")
else:
    print("AGC")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 標準入力を取得
R = int(input())

# 求解処理
ans = str()
if R < 1200:
    ans = "ABC"
elif R < 2800:
    ans = "ARC"
else:
    ans = "AGC"

# 結果出力
print(ans)

Submission status: Accepted

Solution code:
r = int(input())

if r < 1200:
    print('ABC')
elif r < 2800:
    print('ARC')
else:
    print('AGC')

Submission status: Accepted

Solution code:
r=int(input())
if r<1200:
  print('ABC')
elif r<2800:
  print('ARC')
else:
  print('AGC')

Submission status: Accepted

Solution code:
r = int(input())
if r<1200:
    print("ABC")
elif r<2800:
    print("ARC")
else:
    print("AGC")

Submission status: Accepted

Solution code:
n=int(input())
if n<1200:
    print("ABC")
elif n<2800:
    print("ARC")
else:
    print("AGC")

Submission status: Accepted

Solution code:
r = int(input())
 
if r < 1200:
  print('ABC')
elif r < 2800:
  print('ARC')
else:
  print('AGC')

Submission status: Accepted

Solution code:
n = int(input())

if n < 1200:
    print('ABC')
if n >= 1200 and n < 2800:
    print('ARC')
if n >= 2800:
    print('AGC')

Submission status: Accepted

Solution code:
n = int(input())
if n < 1200:
  print("ABC")
elif n < 2800:
  print("ARC")
else:
  print("AGC")

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    if n < 1200:
        print("ABC")
    elif 1200 <= n < 2800:
        print("ARC")
    else:
        print("AGC")


main()

Submission status: Accepted

Solution code:
R = int(input())
if R < 1200:
    print('ABC')
elif 1200 <= R < 2800:
    print('ARC')
else:
    print('AGC')

Submission status: Accepted

Solution code:
R=int(input())
print("ABC" if R<1200
      else "ARC" if R<2800
      else "AGC")

Submission status: Accepted

Solution code:
r = int(input())
if r < 1200:
  print("ABC")
elif r < 2800:
  print("ARC")
else:
  print("AGC")

Submission status: Accepted

Solution code:
R = int(input())

if R < 1200 :
    print('ABC')
elif R < 2800 :
    print('ARC')
else :
    print('AGC')

Submission status: Accepted

Solution code:
r = int(input())
print('ABC' if r < 1200 else 'ARC' if r < 2800 else 'AGC')

Submission status: Accepted

Solution code:
R=int(input())
if R<1200:
  print("ABC")
elif R<2800:
  print("ARC")
else:
  print("AGC")

Submission status: Accepted

Solution code:
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    R = I()

    if R < 1200:
        print('ABC')
    elif 1200 <= R < 2800:
        print('ARC')
    else:
        print('AGC')

if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
r = int(input())
if r<1200:
    print('ABC')
elif r<2800:
    print('ARC')
else:
    print('AGC')

Submission status: Accepted

Solution code:
a=int(input())
print(["ABC","ARC","AGC"][(a>=1200)+(a>=2800)])

Submission status: Accepted

Solution code:
R = int(input())

if R < 1200:
  print("ABC")
elif R < 2800:
  print("ARC")
else:
  print("AGC")

Submission status: Accepted

Solution code:
a = int(input())

if a < 1200:
    print("ABC")
elif 1200 <= a < 2800:
    print("ARC")
elif 2800 <= a:
    print("AGC")

Submission status: Accepted

Solution code:
R=int(input())
if R<1200:
    print("ABC")
elif R<2800:
    print("ARC")
else:
    print("AGC")

Submission status: Accepted

Solution code:
a = int(input())
if a < 1200:
  print('ABC')
elif a >= 1200 and a < 2800:
  print('ARC')
else:
  print('AGC')

Submission status: Accepted

Solution code:
R = int(input())
if R < 1200:
    print("ABC")
elif R < 2800:
    print("ARC")
else:
    print("AGC")

Submission status: Accepted

Solution code:
R = int(input())
if R < 1200:
  print('ABC')
elif R < 2800:
  print('ARC')
else:
  print('AGC')

Submission status: Accepted

Solution code:
R=int(input())
print("A"+"RGB"[(R>=2800)+2*(R<1200)]+"C")

Submission status: Accepted

Solution code:
R = int(input())

ans = ""
if R < 1200:
    ans = "ABC"
elif 1200 <= R < 2800:
    ans = "ARC"
else:
    ans = "AGC"

print(ans)

Submission status: Accepted

Solution code:
r = int(input())
if r < 1200:
    print('ABC')
elif r < 2800:
    print('ARC')
else:
    print('AGC')

Submission status: Accepted

Solution code:
R = int(input())
if R < 1200:
  print("ABC")
elif R < 2800:
  print("ARC")
else:
  print("AGC")

Submission status: Accepted

Solution code:
r=int(input())
if r<1200:
    print("ABC")
elif 1200<=r<2800:
    print("ARC")
else:
    print("AGC")

Submission status: Accepted

Solution code:
r=int(input())
if r<1200:print('ABC')
elif r<2800:print('ARC')
else:print('AGC')

Submission status: Accepted

Solution code:
r=int(input())
if r<1200:
    print("ABC")
elif r<2800:
    print("ARC")
else:
    print("AGC")

Submission status: Accepted

Solution code:
rating = int(input())

if rating < 1200:
    print('ABC')
elif 1200 <= rating < 2800:
    print('ARC')
elif rating >= 2800:
    print('AGC')

Submission status: Accepted

Solution code:
R=int(input())
if R<1200:
  T='ABC'
elif R<2800:
  T='ARC'
else:
  T='AGC'
print(T)

Submission status: Accepted

Solution code:
R = int(input())
if R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
else:
    print('AGC')

Submission status: Accepted

Solution code:
R=int(input())
if R<1200:
  print('ABC')
elif R<2800:
  print('ARC')
else:
  print('AGC')

Submission status: Accepted

Solution code:
def main():
    r = int(input())
    if r >= 2800:
        print("AGC")
    elif r >= 1200:
        print("ARC")
    else:
        print("ABC")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
r = int(input())
if  r < 1200 :
    print("ABC")
elif r < 2800 :
    print("ARC")
else :
    print("AGC")

Submission status: Accepted

Solution code:
R = int(input())

if R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
else:
    print('AGC')

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.buffer.readline

#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return input().rstrip().decode()
def II(): return int(input())
def FI(): return float(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))
# rstrip().decode()



def main():
	r=II()
	ans="AGC"
	if r<1200:
		ans="ABC"
	elif r<2800:
		ans="ARC"
	print(ans)





if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
a=input()
if int(a)<=1199:
  print("ABC")
elif int(a)<=2799:
  print("ARC")
else:
  print("AGC")

Submission status: Accepted

Solution code:

r=int(input())
if r<1200:
    print('ABC')
elif 1200<=r and r<2800:
    print('ARC')
else:
    print('AGC')

Submission status: Accepted

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate, product # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
import math
import bisect
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入g
#
# インデックス系
# int min_y = max(0, i - 2), max_y = min(h - 1, i + 2);
# int min_x = max(0, j - 2), max_x = min(w - 1, j + 2);
#
#
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
#mod = 998244353
from sys import stdin
readline = stdin.readline
def readInts():
  return list(map(int,readline().split()))
def readTuples():
    return tuple(map(int,readline().split()))
def I():
  return int(readline())
r = I()
if r < 1200:
    print('ABC')
elif r < 2800:
    print('ARC')
else:
    print('AGC')

Submission status: Accepted

Solution code:
r = int(input())
if r < 1200:
    print('ABC')
elif r < 2800:
    print('ARC')
else:
    print('AGC')

Submission status: Accepted

Solution code:
R = int(input())
if R < 1200:
    ans = "ABC"
elif R < 2800:
    ans = "ARC"
else:
    ans = "AGC"
print(ans)

Submission status: Accepted

Solution code:
r = int(input())
if r < 1200: ans = "ABC"
elif r < 2800: ans = "ARC"
else: ans = "AGC"
print(ans)

Submission status: Accepted

Solution code:
R = int(input())
if R<1200:
    print("ABC")
elif R<2800:
    print("ARC")
else:
    print("AGC")

Submission status: Accepted

Solution code:
from collections import deque
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import product,permutations,combinations,combinations_with_replacement
from collections import defaultdict,Counter
from bisect import bisect_left,bisect_right
from math import gcd,ceil,floor,factorial
# from fractions import gcd
from functools import reduce
from pprint import pprint
from statistics import mean,median,mode

INF = float("inf")

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col,reverse_flag):
    data.sort(key=lambda x:x[col],reverse=reverse_flag)
    return data

def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

def mycount(ls,x):
    # lsはソート済みであること
    l = bisect_left(ls,x)
    r = bisect_right(ls,x)
    return (r-l)

def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error")

def I():
    return int(input())

def MI():
    return map(int,input().split())

def RI():
    return list(map(int,input().split()))

def CI(n):
    return [ int(input()) for _ in range(n) ]

def LI(n):
    return [ list(map(int,input().split())) for _ in range(n) ]

def S():
    return input()

def MS():
    return input().split()

def RS():
    return list(input())

def CS(n):
    return [ input() for _ in range(n) ]

def LS(n):
    return [ list(input()) for _ in range(n) ]

# ddict = defaultdict(lambda: 0)
# ddict = defaultdict(lambda: 1)
# ddict = defaultdict(lambda: int())
# ddict = defaultdict(lambda: list())
# ddict = defaultdict(lambda: float())

r = I()

if r<1200:
    print("ABC")
elif r<2800:
    print("ARC")
else:
    print("AGC")

Submission status: Accepted

Solution code:
r = int(input())
if r <= 1199:
    print('ABC')
elif r <= 2799:
    print('ARC')
else:
    print('AGC')

Submission status: Accepted

Solution code:
R = int(input())

if R < 1200:
  print('ABC')
elif 1200 <= R and R < 2800:
  print('ARC')
else:
  print('AGC')

Submission status: Accepted

Solution code:
num1 = int(input())

while(num1 >= 0):
  if num1 < 1200:
    print(f"ABC")
  elif num1 >= 1200 and num1 < 2800:
    print(f"ARC")
  elif num1 >= 2800 and num1 <= 4208:
    print(f"AGC")
  break

Submission status: Accepted

Solution code:
rating = int(input())
if(rating>=0 and rating<1200):
  print("ABC")
elif(rating < 2800):
  print("ARC")
elif(rating <= 4208):
  print("AGC")

Submission status: Accepted

Solution code:
r=int(input())
if r<1200:
  print('ABC')
elif r<2800:
  print("ARC")
else:
  print("AGC")

Submission status: Accepted

Solution code:
r = int(input())

if r < 1200:
    print("ABC")
elif r <2800:
    print("ARC")
else:
    print("AGC")

Submission status: Accepted

Solution code:
R = int(input())

if R < 1200:
    print('ABC')
elif R < 2800:
    print('ARC')
else:
    print('AGC')

Submission status: Accepted

Solution code:
r = int(input())
if r<1200:
  print("ABC")
elif r>=1200 and r<2800:
  print("ARC")
else:
  print("AGC")

Submission status: Accepted

Solution code:
n=int(input())
if(n<1200):
    print("ABC")
elif(n<2800):
    print("ARC")
else:
    print("AGC")

Submission status: Accepted

Solution code:
r=int(input())
if r <1200:
  ans="ABC"
elif 1200<=r<2800:
  ans="ARC"
else:
  ans="AGC"
print(ans)

Submission status: Accepted

Solution code:
r = int(input())
if r < 1200:
    print("ABC")
elif r < 2800:
    print("ARC")
else:
    print("AGC")

Submission status: Accepted

Solution code:
r = int(input())
if r < 1200:
  print("ABC")
elif r < 2800:
  print("ARC")
else:
  print("AGC")

Submission status: Accepted

Solution code:
R=int(input())

if R<1200:
    print("ABC")
elif R<2800:
    print("ARC")
else:
    print("AGC")

Submission status: Accepted

Solution code:
a=int(input())
if a>=2800:
  print("AGC")
if 1200<=a<2800:
  print("ARC")
if a<1200:
  print("ABC")

Submission status: Accepted

Solution code:
i=int(input())
print('A%sC'%("B"if i<1200 else "R"if i<2800 else"G"))

Submission status: Accepted

Solution code:
R = int(input())
if R<1200:
	print("ABC")
elif R<2800:
	print("ARC")
else:
	print("AGC")

Submission status: Accepted

Solution code:
r = int(input())
if r < 1200:
  print('ABC')
elif 1200<=r<2800:
  print('ARC')
else:
  print('AGC')

Submission status: Accepted

Solution code:
r = int(input())

if r < 1200:
    print('ABC')
elif 1200 <= r < 2800:
    print('ARC')
elif 2800 <= r:
    print('AGC')

Submission status: Accepted

Solution code:
a = int(input())

if a < 1200:
    print("ABC")
elif a < 2800:
    print("ARC")
else:
    print("AGC")

Submission status: Accepted

Solution code:
R=int(input())
print('ABC' if R<1200 else 'ARC' if R<2800 else 'AGC')

Submission status: Accepted

Solution code:
R=int(input())
print("A"+["GR"[R<2800],"B"][R<1200]+"C")

Submission status: Accepted

Solution code:
r = int(input())
if r>=2800:
    print("AGC")
elif r>=1200:
    print("ARC")
else:
    print("ABC")

Submission status: Accepted

Solution code:
r = int(input())
if r < 1200:
    print('ABC')
elif 1200 <= r < 2800:
    print('ARC')
else:
    print('AGC')