結果
問題 |
No.39 桁の数字を入れ替え
|
ユーザー |
![]() |
提出日時 | 2017-07-28 00:31:09 |
言語 | Nim (2.2.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 233 bytes |
コンパイル時間 | 2,943 ms |
コンパイル使用メモリ | 64,768 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-30 01:50:30 |
合計ジャッジ時間 | 3,513 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 WA * 1 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport] /home/judge/data/code/Main.nim(1, 26) Warning: imported and not used: 'math' [UnusedImport]
ソースコード
import sequtils,strutils,math var N = stdin.readline var ans : int for a in 0..N.high: for b in (a + 1)..N.high: (N[a],N[b]) = (N[b],N[a]) ans = max(ans,N.parseInt) (N[a],N[b]) = (N[b],N[a]) echo ans