結果
問題 | No.272 NOT回路 |
ユーザー |
|
提出日時 | 2017-09-09 17:20:18 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 95 ms / 1,000 ms |
コード長 | 415 bytes |
コンパイル時間 | 99 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-11-07 09:52:04 |
合計ジャッジ時間 | 1,835 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 11 |
コンパイルメッセージ
Syntax OK
ソースコード
class NOTcircuitattr_reader :xdef initialize(x: 0)@x = xenddef causebegin@x = Integer(gets.chomp)rescueendenddef not_circuit(value)(value == 0)? 1 : 0enddef resultputs not_circuit(@x)enddef runcauseresultendendif $0 == __FILE__NOTcircuit.new.runend