結果

問題 No.793 うし数列 2
ユーザー hoge1e3hoge1e3
提出日時 2019-02-25 17:09:00
言語 JavaScript
(node v21.7.1)
結果
TLE  
実行時間 -
コード長 604 bytes
コンパイル時間 43 ms
コンパイル使用メモリ 6,816 KB
実行使用メモリ 52,252 KB
最終ジャッジ日時 2024-04-21 02:28:41
合計ジャッジ時間 4,628 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
46,748 KB
testcase_01 AC 66 ms
39,936 KB
testcase_02 AC 73 ms
40,064 KB
testcase_03 AC 70 ms
40,064 KB
testcase_04 AC 68 ms
39,936 KB
testcase_05 AC 87 ms
47,220 KB
testcase_06 AC 108 ms
45,312 KB
testcase_07 AC 94 ms
45,184 KB
testcase_08 AC 111 ms
45,312 KB
testcase_09 AC 102 ms
45,440 KB
testcase_10 AC 69 ms
39,680 KB
testcase_11 AC 67 ms
39,808 KB
testcase_12 TLE -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

var fs = require('fs');
var length = fs.fstatSync(process.stdin.fd).size;
var buffer = Buffer.alloc(length);
var bytesRead = fs.readSync(process.stdin.fd, buffer, 0, length, 0);
var input = buffer.toString('utf8', 0, bytesRead);

//var input="1000000000000000000";
var m=1000000007n;
// u1 = um
var n=BigInt(input);
n=(n-1n)%(m-1n)+1n;
n=(n+"").replace("n","")-0;
m=(m+"").replace("n","")-0;
var b=1;


//var chk=263119286;
while(n--) {
    b=(b*10+3)%m;
    /*if (b===chk) {
        console.log(n);
        break;
    }*/
    //console.log((s=>s.substring(s.length-9))("00000000"+b));
}
console.log(b);
0