結果

問題 No.1468 Colourful Pastel
ユーザー johnjohn
提出日時 2021-06-20 02:18:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 1,001 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 10,752 KB
実行使用メモリ 24,288 KB
最終ジャッジ日時 2023-09-05 01:18:58
合計ジャッジ時間 6,437 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 TLE -
testcase_02 AC 15 ms
7,848 KB
testcase_03 AC 16 ms
7,856 KB
testcase_04 AC 15 ms
7,872 KB
testcase_05 AC 15 ms
7,924 KB
testcase_06 AC 15 ms
7,900 KB
testcase_07 AC 15 ms
7,912 KB
testcase_08 AC 15 ms
7,848 KB
testcase_09 AC 15 ms
7,928 KB
testcase_10 AC 16 ms
7,752 KB
testcase_11 AC 16 ms
7,916 KB
testcase_12 AC 15 ms
7,796 KB
testcase_13 AC 16 ms
7,828 KB
testcase_14 AC 15 ms
7,800 KB
testcase_15 AC 15 ms
7,916 KB
testcase_16 AC 15 ms
7,860 KB
testcase_17 AC 15 ms
7,860 KB
testcase_18 AC 15 ms
7,720 KB
testcase_19 AC 15 ms
7,708 KB
testcase_20 AC 15 ms
7,916 KB
testcase_21 AC 15 ms
7,716 KB
testcase_22 AC 15 ms
7,736 KB
testcase_23 AC 15 ms
7,800 KB
testcase_24 AC 15 ms
7,716 KB
testcase_25 AC 15 ms
7,852 KB
testcase_26 AC 15 ms
7,752 KB
testcase_27 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding utf-8

# 標準入力から各値を受け取り、色のリスト2つ分のみをmain関数に返す
def Input_lst():
    input() # pythonでは必要ないと思う、今回のプログラムでは使用していない
    lst1 = input().split(" ") # 一行目のリスト(問題では最初に買った絵の具のリスト)
    lst2 = input().split(" ") # 二行目のリスト(問題では使った後なくなってしまった色を除かれた絵の具のリスト)
    return lst1, lst2;

# 一行目のリストの内容から二行目のリストを比較し、無くなった絵の具の色を返す
def Lst_difference(lst1, lst2):
    result = lst1.copy() # resultにlst1のコピーを写し、result - lst2 を下の処理で行う

    for value in lst2:
        if value in result:
            result.remove(value)

    return result;

def main():
    lst1,lst2 = Input_lst()
    answer = Lst_difference(lst1,lst2)
    print(*answer)

if __name__ == '__main__':
    main()
0