結果

問題 No.744 循環小数N桁目 Easy
ユーザー megane_anko
提出日時 2021-02-23 00:02:03
言語 TypeScript
(5.7.2)
結果
AC  
実行時間 66 ms / 2,000 ms
コード長 389 bytes
コンパイル時間 8,787 ms
コンパイル使用メモリ 228,536 KB
実行使用メモリ 39,424 KB
最終ジャッジ日時 2024-12-31 16:29:03
合計ジャッジ時間 9,710 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

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

let N = parseInt(input);

if (N % 6 === 1) {
    console.log('2');
} else if (N % 6 === 2) {
    console.log('8');
} else if (N % 6 === 3) {
    console.log('5');
} else if (N % 6 === 4) {
    console.log('7');
} else if (N % 6 === 5) {
    console.log('1');
} else if (N % 6 === 0) {
    console.log('4');
} 
0