結果
問題 |
No.39 桁の数字を入れ替え
|
ユーザー |
|
提出日時 | 2018-08-13 21:30:18 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 362 bytes |
コンパイル時間 | 402 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-09-24 08:18:23 |
合計ジャッジ時間 | 1,546 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 WA * 1 |
ソースコード
from sys import stdin, stdout input = lambda: stdin.readline().rstrip() write = stdout.write def main(): N = list(input()) l = len(N) maxn = '0' for i in range(l - 1): for j in range(i + 1, l): num = N[:] num[i], num[j] = num[j], num[i] maxn = max(maxn, ''.join(num)) write(maxn + '\n') main()