結果
| 問題 | No.9001 標準入出力の練習問題(テスト用) |
| ユーザー |
ID 21712
|
| 提出日時 | 2024-12-23 09:43:04 |
| 言語 | TypeScript (6.0.2) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 342 bytes |
| 記録 | |
| コンパイル時間 | 4,527 ms |
| コンパイル使用メモリ | 346,400 KB |
| 最終ジャッジ日時 | 2026-06-05 07:00:20 |
| 合計ジャッジ時間 | 5,319 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.ts(5,21): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. main.ts(6,21): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'.
ソースコード
/// <reference types="/home/linuxbrew/.linuxbrew/lib/node_modules/@types/node" />
function main(data: string): void {
const input = data.trim().split(/\s+/);
const A = parseInt(input.shift());
const B = parseInt(input.shift());
const S = input.shift();
console.log(A + B, S);
}
main(require('fs').readFileSync('/dev/stdin', 'utf-8'));
ID 21712