結果

問題 No.9000 Hello World! (テスト用)
ユーザー taizodtaizod
提出日時 2021-10-15 02:39:00
言語 TypeScript
(5.4.3)
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 871 bytes
コンパイル時間 4,327 ms
コンパイル使用メモリ 143,848 KB
最終ジャッジ日時 2024-04-27 03:58:42
合計ジャッジ時間 4,719 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
main.ts(1,21): error TS2307: Cannot find module 'fs' or its corresponding type declarations.
main.ts(4,67): error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.

ソースコード

diff #

import * as fs from "fs";

// util for input
const lineit = (function* () { for (const line of fs.readFileSync(process.stdin.fd, "utf8").split("\n")) yield line.trim(); })();
const wordit = (function* () { while (true) { let line = lineit.next(); if (line.done) break; for (const word of String(line.value).split(" ")) yield word; } })();
const charit = (function* () { while (true) { let word = wordit.next(); if (word.done) break; for (const char of String(word.value).split("")) yield char; } })();
const readline = () => String((lineit.next()).value);
const read = () => String((wordit.next()).value);
const readchar = () => String((charit.next()).value);

// main
const main = function () {
    // param
    let s: string;
    
    // init
    s = read();

    // solve
    let ans = "Hello World!";
    
    // answer
    console.log(ans);

    return;

};
main();
0