結果
問題 | No.299 蟻本が読めない |
ユーザー |
|
提出日時 | 2017-09-12 17:33:01 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 94 ms / 1,000 ms |
コード長 | 430 bytes |
コンパイル時間 | 206 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-11-07 17:23:21 |
合計ジャッジ時間 | 1,542 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
コンパイルメッセージ
Syntax OK
ソースコード
class AntBooks attr_reader :n def initialize(n: 0) @n = n end def cause begin @n = Integer(gets.chomp) rescue end end def arithmetic_sequence(n) 316 + (52 * (n-1)) end def result puts arithmetic_sequence(@n) end def run cause result end end if $0 == __FILE__ AntBooks.new.run end