結果

問題 No.1499 羊が、何匹だっけ
ユーザー tamura2004tamura2004
提出日時 2021-06-26 19:40:13
言語 Crystal
(1.11.2)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 116 bytes
コンパイル時間 18,214 ms
コンパイル使用メモリ 254,776 KB
実行使用メモリ 4,600 KB
最終ジャッジ日時 2023-09-07 15:31:11
合計ジャッジ時間 18,897 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,436 KB
testcase_01 AC 3 ms
4,484 KB
testcase_02 AC 2 ms
4,500 KB
testcase_03 AC 2 ms
4,444 KB
testcase_04 AC 3 ms
4,560 KB
testcase_05 AC 2 ms
4,492 KB
testcase_06 AC 3 ms
4,420 KB
testcase_07 AC 2 ms
4,484 KB
testcase_08 AC 3 ms
4,452 KB
testcase_09 AC 2 ms
4,532 KB
testcase_10 AC 3 ms
4,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = gets.to_s.to_i64
n.times do
  s = gets.to_s
  x = s.split[2].to_i
  y = x.succ.to_s
  puts s.gsub(x.to_s,y)
end
0