結果
| 問題 | No.2784 繰り上がりなし十進和 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-14 22:33:26 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 352 bytes |
| 記録 | |
| コンパイル時間 | 314 ms |
| コンパイル使用メモリ | 81,792 KB |
| 実行使用メモリ | 108,432 KB |
| 最終ジャッジ日時 | 2024-06-14 22:33:30 |
| 合計ジャッジ時間 | 3,852 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 TLE * 1 -- * 33 |
ソースコード
def f(a,b):
ret=0
for i in range(6):
x=a%10+b%10
a//=10
b//=10
x%=10
ret+=x*(10**i)
return ret
L=[int(input()) for _ in range(6)]
S=set(L)
nx=S
while 1:
nx2=set()
for a in nx:
for b in S:
x=f(a,b)
if x not in S:
nx2.add(x)
if nx2==set():
break
else:
S|=nx2
nx=nx2
print(len(S))