結果
問題 | No.432 占い(Easy) |
ユーザー |
![]() |
提出日時 | 2018-12-30 13:06:26 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 202 ms / 2,000 ms |
コード長 | 266 bytes |
コンパイル時間 | 53 ms |
コンパイル使用メモリ | 7,296 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-10-06 18:32:26 |
合計ジャッジ時間 | 3,885 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 22 |
コンパイルメッセージ
Main.rb:17: warning: literal in condition Syntax OK
ソースコード
t=gets.to_it.times do|i|s=gets.chomp.split("").map(&:to_i)while 1if s.size==1puts sbreakelse(s.size-1).times do|j|s[j]=s[j].to_i+s[j+1].to_iif s[j]>=10s[j]=(s[j]/10).to_i+(s[j]%10).to_iendends.pop(1)endendend