結果
| 問題 | No.3678 しゃべりすぎた男 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-09-05 14:06:39 |
| 言語 | Ruby (4.0.6) |
| 結果 |
AC
|
| 実行時間 | 54 ms / 2,000 ms |
| + 173µs | |
| コード長 | 195 bytes |
| 記録 | |
| コンパイル時間 | 777 ms |
| コンパイル使用メモリ | 9,676 KB |
| 実行使用メモリ | 14,592 KB |
| 最終ジャッジ日時 | 2026-09-05 14:07:38 |
| 合計ジャッジ時間 | 4,007 ms |
|
ジャッジサーバーID (参考情報) |
judge6_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 33 |
コンパイルメッセージ
Main.rb:9: warning: ambiguous first argument; put parentheses or a space even after `-` operator Syntax OK
ソースコード
# frozen_string_literal: true
in_t = gets.chomp.split.map(&:to_i)
total = 6000
in_t.each do |t|
total -= t
if total < 0 || t == -1
total = -1
puts -1
else
puts total
end
end