Submission #6905101


Source Code Expand

n = int(input())
time = [0 for _ in range(n)]
def suc(time):
  now = 0
  while now < n:
    if time[now] != 2:
      time[now] += 1
      break
    else:
      time[now] = 0
      now += 1
  else:
    time = 'over'
  return time
#print(suc([0,0,0]),suc([2,2,0]),suc([2,2,2]))
while time != 'over':
  now = ''
  for i in range(n):
    if time[n-1-i] == 0:
      now += 'a'
    elif time[n-1-i] == 1:
      now += 'b'
    else:
      now += 'c'
  print(now)
  time = suc(time)

Submission Info

Submission Time
Task C - Brute-force Attack
User ZOZO
Language Python (3.4.3)
Score 100
Code Size 499 Byte
Status AC
Exec Time 44 ms
Memory 3188 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 8
Set Name Test Cases
Sample subtask0_sample_01.txt, subtask0_sample_02.txt
All subtask0_sample_01.txt, subtask0_sample_02.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt
Case Name Status Exec Time Memory
subtask0_sample_01.txt AC 17 ms 3064 KB
subtask0_sample_02.txt AC 18 ms 3064 KB
subtask1_01.txt AC 18 ms 3064 KB
subtask1_02.txt AC 18 ms 3064 KB
subtask1_03.txt AC 19 ms 3064 KB
subtask1_04.txt AC 20 ms 3188 KB
subtask1_05.txt AC 26 ms 3188 KB
subtask1_06.txt AC 44 ms 3188 KB