結果
問題 | No.927 Second Permutation |
ユーザー |
![]() |
提出日時 | 2020-08-13 07:25:31 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 278 ms / 2,000 ms |
コード長 | 243 bytes |
コンパイル時間 | 232 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 23,936 KB |
最終ジャッジ日時 | 2024-10-09 18:57:39 |
合計ジャッジ時間 | 6,488 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
コンパイルメッセージ
Syntax OK
ソースコード
s = gets.chomp.chars.sort.reverse.joint = s.reverse.chars(t.size - 1).times do |i|if t[i] != t[i + 1]t[i], t[i + 1] = t[i + 1], t[i]breakendendt = t.join.reverseif s == t || t.to_i.to_s != tputs(-1)elsif puts tend