結果
| 問題 | No.1687 What the Heck? | 
| コンテスト | |
| ユーザー |  siman | 
| 提出日時 | 2021-09-26 03:25:38 | 
| 言語 | Ruby (3.4.1) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 128 bytes | 
| コンパイル時間 | 45 ms | 
| コンパイル使用メモリ | 7,552 KB | 
| 実行使用メモリ | 25,472 KB | 
| 最終ジャッジ日時 | 2024-07-05 15:34:27 | 
| 合計ジャッジ時間 | 3,205 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 8 WA * 10 | 
コンパイルメッセージ
Syntax OK
ソースコード
N = gets.to_i P = gets.split.map(&:to_i) idx = P.index(N) + 1 if N == 1 puts 0 else puts [0, (1..N).sum - 2 * idx].max end
