結果
問題 |
No.69 文字を自由に並び替え
|
ユーザー |
|
提出日時 | 2018-02-02 21:45:27 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 32 ms / 5,000 ms |
コード長 | 338 bytes |
コンパイル時間 | 549 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-12-14 06:56:04 |
合計ジャッジ時間 | 1,997 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 |
ソースコード
from collections import Counter A = input() B = input() A_list = [] B_list = [] for c1, c2 in zip(A, B): A_list.append(c1) B_list.append(c2) A = sorted(A_list) B = sorted(B_list) yes_flag = True for c1, c2 in zip(A, B): if c1 != c2: print('NO') yes_flag = False break if yes_flag: print('YES')