結果

問題 No.39 桁の数字を入れ替え
ユーザー mmmpppmmmppp
提出日時 2017-02-26 22:33:30
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 128 bytes
コンパイル時間 252 ms
コンパイル使用メモリ 11,308 KB
実行使用メモリ 15,368 KB
最終ジャッジ日時 2023-09-02 10:13:00
合計ジャッジ時間 2,649 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,368 KB
testcase_01 AC 79 ms
15,304 KB
testcase_02 AC 79 ms
15,160 KB
testcase_03 AC 78 ms
15,140 KB
testcase_04 AC 81 ms
15,096 KB
testcase_05 AC 81 ms
15,300 KB
testcase_06 AC 79 ms
15,092 KB
testcase_07 AC 81 ms
15,140 KB
testcase_08 WA -
testcase_09 AC 81 ms
15,284 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 79 ms
15,352 KB
testcase_15 AC 80 ms
15,156 KB
testcase_16 AC 80 ms
15,168 KB
testcase_17 AC 80 ms
15,096 KB
testcase_18 AC 82 ms
15,048 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

s=gets.chop.chars
t=s.max
s.size.times{|i|
  y=s[i]
  if y!=t
    x=s.rindex t
    s[i]=t 
    s[x]=y
    break
  end
}
$><<s*''
0