結果
問題 | No.693 square1001 and Permutation 2 |
ユーザー |
![]() |
提出日時 | 2018-06-08 23:10:01 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 94 ms / 2,000 ms |
コード長 | 137 bytes |
コンパイル時間 | 37 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-06-30 11:00:26 |
合計ジャッジ時間 | 1,639 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
コンパイルメッセージ
Main.rb:3: warning: assigned but unused variable - n Syntax OK
ソースコード
#!/usr/bin/env rubyn=gets.chomp.to_ia=gets.split.map(&:to_i)a=a.sortc=0a.each.with_index(1) do |e, i|c+=(e-i).absendputs c