結果
問題 | No.1070 Missing a space |
ユーザー |
![]() |
提出日時 | 2021-01-17 01:03:35 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 87 ms / 1,000 ms |
コード長 | 226 bytes |
コンパイル時間 | 466 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-11-28 16:35:26 |
合計ジャッジ時間 | 2,366 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
コンパイルメッセージ
Syntax OK
ソースコード
numbers = gets.chomp.split('').map(&:to_i) another = [] pattern_count = 0 while numbers.size > 1 another.push(numbers.shift) next if numbers.first.zero? || another.first.zero? pattern_count += 1 end puts pattern_count