結果
問題 | No.9000 Hello World! (テスト用) |
ユーザー | らっしー(raccy) |
提出日時 | 2015-11-14 21:17:13 |
言語 | JavaScript (node v21.7.1) |
結果 |
AC
|
実行時間 | 76 ms / 5,000 ms |
コード長 | 7,194 bytes |
コンパイル時間 | 117 ms |
コンパイル使用メモリ | 5,120 KB |
実行使用メモリ | 40,448 KB |
最終ジャッジ日時 | 2024-10-12 23:35:00 |
合計ジャッジ時間 | 755 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 72 ms
40,064 KB |
testcase_01 | AC | 76 ms
40,448 KB |
testcase_02 | AC | 74 ms
40,448 KB |
testcase_03 | AC | 72 ms
40,064 KB |
ソースコード
/* PureScript Main.purs module Main where import Prelude import Control.Monad.Eff import Control.Monad.Eff.Console import Node.ReadLine main :: forall eff. Eff (console :: CONSOLE | eff) Interface main = do interface <- createInterface noCompletion setLineHandler interface $ \_ -> do log "Hello World!" close interface */ // Generated by psc-bundle 0.7.5.3 var PS = { }; (function(exports) { /* global exports */ "use strict"; // module Control.Monad.Eff exports.returnE = function (a) { return function () { return a; }; }; exports.bindE = function (a) { return function (f) { return function () { return f(a())(); }; }; }; })(PS["Control.Monad.Eff"] = PS["Control.Monad.Eff"] || {}); (function(exports) { // Generated by psc version 0.7.5.3 "use strict"; var $foreign = PS["Prelude"]; var Functor = function (map) { this.map = map; }; var Apply = function (__superclass_Prelude$dotFunctor_0, apply) { this["__superclass_Prelude.Functor_0"] = __superclass_Prelude$dotFunctor_0; this.apply = apply; }; var Applicative = function (__superclass_Prelude$dotApply_0, pure) { this["__superclass_Prelude.Apply_0"] = __superclass_Prelude$dotApply_0; this.pure = pure; }; var Bind = function (__superclass_Prelude$dotApply_0, bind) { this["__superclass_Prelude.Apply_0"] = __superclass_Prelude$dotApply_0; this.bind = bind; }; var Monad = function (__superclass_Prelude$dotApplicative_0, __superclass_Prelude$dotBind_1) { this["__superclass_Prelude.Applicative_0"] = __superclass_Prelude$dotApplicative_0; this["__superclass_Prelude.Bind_1"] = __superclass_Prelude$dotBind_1; }; var pure = function (dict) { return dict.pure; }; var $$return = function (__dict_Applicative_2) { return pure(__dict_Applicative_2); }; var map = function (dict) { return dict.map; }; var bind = function (dict) { return dict.bind; }; var apply = function (dict) { return dict.apply; }; var $less$times$greater = function (__dict_Apply_25) { return apply(__dict_Apply_25); }; var liftA1 = function (__dict_Applicative_26) { return function (f) { return function (a) { return $less$times$greater(__dict_Applicative_26["__superclass_Prelude.Apply_0"]())(pure(__dict_Applicative_26)(f))(a); }; }; }; var ap = function (__dict_Monad_30) { return function (f) { return function (a) { return bind(__dict_Monad_30["__superclass_Prelude.Bind_1"]())(f)(function (_2) { return bind(__dict_Monad_30["__superclass_Prelude.Bind_1"]())(a)(function (_1) { return $$return(__dict_Monad_30["__superclass_Prelude.Applicative_0"]())(_2(_1)); }); }); }; }; }; exports["Monad"] = Monad; exports["Bind"] = Bind; exports["Applicative"] = Applicative; exports["Apply"] = Apply; exports["Functor"] = Functor; exports["ap"] = ap; exports["return"] = $$return; exports["bind"] = bind; exports["liftA1"] = liftA1; exports["pure"] = pure; exports["apply"] = apply; exports["map"] = map;; })(PS["Prelude"] = PS["Prelude"] || {}); (function(exports) { // Generated by psc version 0.7.5.3 "use strict"; var $foreign = PS["Control.Monad.Eff"]; var Prelude = PS["Prelude"]; var monadEff = new Prelude.Monad(function () { return applicativeEff; }, function () { return bindEff; }); var bindEff = new Prelude.Bind(function () { return applyEff; }, $foreign.bindE); var applyEff = new Prelude.Apply(function () { return functorEff; }, Prelude.ap(monadEff)); var applicativeEff = new Prelude.Applicative(function () { return applyEff; }, $foreign.returnE); var functorEff = new Prelude.Functor(Prelude.liftA1(applicativeEff)); exports["functorEff"] = functorEff; exports["applyEff"] = applyEff; exports["applicativeEff"] = applicativeEff; exports["bindEff"] = bindEff; exports["monadEff"] = monadEff;; })(PS["Control.Monad.Eff"] = PS["Control.Monad.Eff"] || {}); (function(exports) { /* global exports, console */ "use strict"; // module Control.Monad.Eff.Console exports.log = function (s) { return function () { console.log(s); return {}; }; }; })(PS["Control.Monad.Eff.Console"] = PS["Control.Monad.Eff.Console"] || {}); (function(exports) { // Generated by psc version 0.7.5.3 "use strict"; var $foreign = PS["Control.Monad.Eff.Console"]; var Prelude = PS["Prelude"]; var Control_Monad_Eff = PS["Control.Monad.Eff"]; exports["log"] = $foreign.log;; })(PS["Control.Monad.Eff.Console"] = PS["Control.Monad.Eff.Console"] || {}); (function(exports) { /* global exports */ "use strict"; // module Node.ReadLine exports.setLineHandler = function(readline) { return function(callback) { return function() { readline.removeAllListeners('line'); readline.on('line', function(line) { callback(line)(); }); return readline; }; }; }; exports.createInterface = function(completer) { return function() { var readline = require('readline'); return readline.createInterface({ input: process.stdin, output: process.stdout, completer: function(line) { var res = completer(line)(); return [res.completions, res.suffix]; } }); }; }; exports.close = function(readline) { return function() { readline.close(); return readline; }; }; })(PS["Node.ReadLine"] = PS["Node.ReadLine"] || {}); (function(exports) { // Generated by psc version 0.7.5.3 "use strict"; var $foreign = PS["Node.ReadLine"]; var Prelude = PS["Prelude"]; var Control_Monad_Eff = PS["Control.Monad.Eff"]; var Control_Monad_Eff_Console = PS["Control.Monad.Eff.Console"]; var noCompletion = function (s) { return Prelude["return"](Control_Monad_Eff.applicativeEff)({ completions: [ ], matched: s }); }; exports["noCompletion"] = noCompletion; exports["close"] = $foreign.close; exports["createInterface"] = $foreign.createInterface; exports["setLineHandler"] = $foreign.setLineHandler;; })(PS["Node.ReadLine"] = PS["Node.ReadLine"] || {}); (function(exports) { // Generated by psc version 0.7.5.3 "use strict"; var Prelude = PS["Prelude"]; var Control_Monad_Eff = PS["Control.Monad.Eff"]; var Control_Monad_Eff_Console = PS["Control.Monad.Eff.Console"]; var Node_ReadLine = PS["Node.ReadLine"]; var main = function __do() { var _0 = Node_ReadLine.createInterface(Node_ReadLine.noCompletion)(); return Node_ReadLine.setLineHandler(_0)(function (_1) { return function __do() { Control_Monad_Eff_Console.log("Hello World!")(); return Node_ReadLine.close(_0)(); }; })(); }; exports["main"] = main;; })(PS["Main"] = PS["Main"] || {}); PS["Main"].main();