結果

問題 No.2784 繰り上がりなし十進和
コンテスト
ユーザー Butterflv
提出日時 2024-06-14 21:41:26
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 1,331 ms / 2,000 ms
コード長 550 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 194 ms
コンパイル使用メモリ 85,768 KB
実行使用メモリ 245,836 KB
最終ジャッジ日時 2026-03-06 01:24:43
合計ジャッジ時間 43,447 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 36
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

A=[]
for i in range(6):
  S=input()
  res=0
  for i in range(6):
    res += (int(S[i])*(10**(5-i)))
  A.append(res)
# print(A)

_10 = [10**i for i in range(10)]

def op(left, right):
  res=0
  for i in range(6):
    res += ((left//_10[i] + right//_10[i])%10)*_10[i]
  return res

B=[[] for i in range(6)]

for i in range(6):
  temp = A[i]
  for j in range(13):
    B[i].append(temp)
    temp = op(temp, A[i])

set_=set()

for i in range(10**6):
  num = 0
  for j in range(6):
    num = op(num, B[j][(i//_10[j])%10])
  set_.add(num)

print(len(set_))
0