結果
| 問題 |
No.656 ゴルフ
|
| コンテスト | |
| ユーザー |
megane_anko
|
| 提出日時 | 2021-03-10 11:27:29 |
| 言語 | TypeScript (5.7.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 386 bytes |
| コンパイル時間 | 8,346 ms |
| コンパイル使用メモリ | 230,196 KB |
| 実行使用メモリ | 41,324 KB |
| 最終ジャッジ日時 | 2024-12-31 16:33:33 |
| 合計ジャッジ時間 | 9,699 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 4 |
| other | WA * 6 |
ソースコード
import * as fs from 'fs';
const input = fs.readFileSync('/dev/stdin', 'utf8');
const nlarray = input.split('\n');
const array = nlarray[0].split('');
const narray = array.map(Number);
console.log(narray);
let score = 0;
for (let i = 0;i < narray.length; i++) {
if (narray[i] === 0) {
score += 10;
} else {
score = score + narray[i];
}
}
console.log(score);
megane_anko