結果
問題 | No.69 文字を自由に並び替え |
ユーザー |
|
提出日時 | 2024-12-15 04:41:52 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 29 ms / 5,000 ms |
コード長 | 545 bytes |
コンパイル時間 | 214 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-12-15 04:41:54 |
合計ジャッジ時間 | 1,395 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 |
ソースコード
def main(): a = list(input()) b = list(input()) i = 0 while i < len(a): flag = False j = 0 while j < len(b): if a[i] == b[j]: match_char = a[i] flag = True break else: j += 1 if flag: b.remove(match_char) a.remove(match_char) else: i += 1 if len(b) != 0: print("NO") if len(b) == 0: print("YES") if __name__ == "__main__": main()