結果

問題 No.661 ハローキティはりんご3個分
ユーザー megane_ankomegane_anko
提出日時 2021-02-14 22:05:36
言語 TypeScript
(5.4.3)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 517 bytes
コンパイル時間 8,786 ms
コンパイル使用メモリ 252,940 KB
実行使用メモリ 42,480 KB
最終ジャッジ日時 2023-09-29 15:37:57
合計ジャッジ時間 10,140 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
42,248 KB
testcase_01 AC 73 ms
42,388 KB
testcase_02 AC 75 ms
42,212 KB
testcase_03 AC 74 ms
42,480 KB
testcase_04 AC 74 ms
42,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import * as fs from 'fs';
const input = fs.readFileSync('/dev/stdin', 'utf8');

const arr = input.split(/[ \n]/);
//let N = parseInt(arr[i]);//Nの宣言を間違えていたし、宣言する場所もおかしかった

for (let j = 1; j < arr.length - 1 ; j++) {
    let N = parseInt(arr[j]);
    if (N % 40 === 0) {
        console.log("ikisugi");
    } else if (N % 8 === 0) {
        console.log("iki");
    } else if (N % 10 === 0) {
        console.log("sugi");
    } else {
        console.log(N / 3);
    }
}
0