結果
問題 | No.428 小数から逃げる夢 |
ユーザー | watarimaycry2 |
提出日時 | 2020-05-20 00:06:52 |
言語 | JavaScript (node v21.7.1) |
結果 |
AC
|
実行時間 | 113 ms / 1,000 ms |
コード長 | 2,372 bytes |
コンパイル時間 | 90 ms |
コンパイル使用メモリ | 6,816 KB |
実行使用メモリ | 42,436 KB |
最終ジャッジ日時 | 2024-10-13 01:58:16 |
合計ジャッジ時間 | 10,427 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 80 ms
42,164 KB |
testcase_01 | AC | 86 ms
42,300 KB |
testcase_02 | AC | 82 ms
40,576 KB |
testcase_03 | AC | 81 ms
42,304 KB |
testcase_04 | AC | 79 ms
42,048 KB |
testcase_05 | AC | 78 ms
42,348 KB |
testcase_06 | AC | 78 ms
40,320 KB |
testcase_07 | AC | 83 ms
39,936 KB |
testcase_08 | AC | 78 ms
42,184 KB |
testcase_09 | AC | 80 ms
42,052 KB |
testcase_10 | AC | 79 ms
42,300 KB |
testcase_11 | AC | 80 ms
42,308 KB |
testcase_12 | AC | 78 ms
40,320 KB |
testcase_13 | AC | 79 ms
40,064 KB |
testcase_14 | AC | 78 ms
42,096 KB |
testcase_15 | AC | 80 ms
40,192 KB |
testcase_16 | AC | 78 ms
40,192 KB |
testcase_17 | AC | 79 ms
42,296 KB |
testcase_18 | AC | 78 ms
40,320 KB |
testcase_19 | AC | 79 ms
40,064 KB |
testcase_20 | AC | 78 ms
42,048 KB |
testcase_21 | AC | 79 ms
40,064 KB |
testcase_22 | AC | 78 ms
40,192 KB |
testcase_23 | AC | 78 ms
40,192 KB |
testcase_24 | AC | 79 ms
42,180 KB |
testcase_25 | AC | 78 ms
40,576 KB |
testcase_26 | AC | 78 ms
42,304 KB |
testcase_27 | AC | 80 ms
40,320 KB |
testcase_28 | AC | 77 ms
40,576 KB |
testcase_29 | AC | 113 ms
40,192 KB |
testcase_30 | AC | 87 ms
42,096 KB |
testcase_31 | AC | 78 ms
40,320 KB |
testcase_32 | AC | 78 ms
40,192 KB |
testcase_33 | AC | 80 ms
40,320 KB |
testcase_34 | AC | 78 ms
42,304 KB |
testcase_35 | AC | 78 ms
40,064 KB |
testcase_36 | AC | 78 ms
40,448 KB |
testcase_37 | AC | 79 ms
42,040 KB |
testcase_38 | AC | 78 ms
40,064 KB |
testcase_39 | AC | 80 ms
42,100 KB |
testcase_40 | AC | 78 ms
40,320 KB |
testcase_41 | AC | 80 ms
40,320 KB |
testcase_42 | AC | 79 ms
40,320 KB |
testcase_43 | AC | 80 ms
42,228 KB |
testcase_44 | AC | 78 ms
40,064 KB |
testcase_45 | AC | 77 ms
40,576 KB |
testcase_46 | AC | 79 ms
42,172 KB |
testcase_47 | AC | 81 ms
40,192 KB |
testcase_48 | AC | 78 ms
40,448 KB |
testcase_49 | AC | 79 ms
42,308 KB |
testcase_50 | AC | 80 ms
42,424 KB |
testcase_51 | AC | 78 ms
40,064 KB |
testcase_52 | AC | 84 ms
40,576 KB |
testcase_53 | AC | 80 ms
40,320 KB |
testcase_54 | AC | 79 ms
42,436 KB |
testcase_55 | AC | 79 ms
40,064 KB |
testcase_56 | AC | 79 ms
42,296 KB |
testcase_57 | AC | 79 ms
42,048 KB |
testcase_58 | AC | 78 ms
40,448 KB |
testcase_59 | AC | 79 ms
40,192 KB |
testcase_60 | AC | 79 ms
40,576 KB |
testcase_61 | AC | 79 ms
40,576 KB |
testcase_62 | AC | 80 ms
42,424 KB |
testcase_63 | AC | 80 ms
42,304 KB |
testcase_64 | AC | 80 ms
42,436 KB |
testcase_65 | AC | 78 ms
40,192 KB |
testcase_66 | AC | 79 ms
42,304 KB |
testcase_67 | AC | 77 ms
40,576 KB |
testcase_68 | AC | 80 ms
40,192 KB |
testcase_69 | AC | 78 ms
42,172 KB |
testcase_70 | AC | 78 ms
40,320 KB |
testcase_71 | AC | 78 ms
40,064 KB |
testcase_72 | AC | 79 ms
42,172 KB |
testcase_73 | AC | 78 ms
40,320 KB |
testcase_74 | AC | 80 ms
40,320 KB |
testcase_75 | AC | 77 ms
40,192 KB |
testcase_76 | AC | 78 ms
40,064 KB |
testcase_77 | AC | 78 ms
40,576 KB |
testcase_78 | AC | 77 ms
40,576 KB |
testcase_79 | AC | 79 ms
42,304 KB |
testcase_80 | AC | 79 ms
42,096 KB |
testcase_81 | AC | 80 ms
40,320 KB |
testcase_82 | AC | 79 ms
42,184 KB |
testcase_83 | AC | 80 ms
42,432 KB |
testcase_84 | AC | 78 ms
40,064 KB |
testcase_85 | AC | 79 ms
42,432 KB |
testcase_86 | AC | 77 ms
42,168 KB |
testcase_87 | AC | 78 ms
40,448 KB |
testcase_88 | AC | 78 ms
42,236 KB |
testcase_89 | AC | 78 ms
42,360 KB |
testcase_90 | AC | 79 ms
42,048 KB |
testcase_91 | AC | 80 ms
40,192 KB |
testcase_92 | AC | 79 ms
42,304 KB |
testcase_93 | AC | 79 ms
40,192 KB |
testcase_94 | AC | 77 ms
40,704 KB |
testcase_95 | AC | 80 ms
40,192 KB |
testcase_96 | AC | 79 ms
40,192 KB |
testcase_97 | AC | 79 ms
40,192 KB |
testcase_98 | AC | 80 ms
42,220 KB |
testcase_99 | AC | 79 ms
42,104 KB |
ソースコード
var read = require('readline').createInterface({ input: process.stdin, output: process.stdout }); var obj; var inLine = []; read.on('line', function(input){inLine.push(input);}); read.on('close', function(){ obj = init(inLine); myerr("-----start-----"); var start = new Date(); Main(); var end = new Date() - start; myerr("----- end -----"); myerr("time : " + (end) + "ms"); }); function nextInt(){return myconv(next(),1);} function nextStrArray(){return myconv(next(),2);} function nextIntArray(){return myconv(next(),4);} function nextCharArray(){return myconv(next(),6);} function next(){return obj.next();} function hasNext(){return obj.hasNext();} function init(input){ var returnObj = { list : input, index : 0, max : input.length, hasNext : function(){return (this.index < this.max);}, next : function(){if(!this.hasNext()){throw "ArrayIndexOutOfBoundsException これ以上ないよ";}else{var returnInput = this.list[this.index];this.index++;return returnInput;}} }; return returnObj; } function myout(s){console.log(s);} function myerr(s){console.error("debug:" + require("util").inspect(s,false,null));} //[no]要素の扱い。数値型 //不明値、異常時:引数そのまま返す 1:数値へ変換 //2:半角SPで分割 4:半角SPで分割し、数値配列へ //6:1文字で分割 7:1文字で分割し、数値配列へ //8:半角SPで結合 9:改行で結合 0:文字なしで結合 function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(" ");case 4:return i.split(" ").map(Number);case 6:return i.split("");case 7:return i.split("").map(Number);case 8:return i.join(" ");case 9:return i.join("\n");case 0:return i.join("");default:return i;}}catch(e){return i;}} function Main(){ var N = nextInt(); var D = "0.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991".split(""); var output = []; var countUp = 0; while(D.length > 0 || countUp != 0){ var val; if(D.length != 0){ val = D.pop(); }else{ val = 0; } if(val == "."){ output.unshift(val); continue; }else{ val = parseInt(val); } val *= N; val += countUp; output.unshift(val % 10); countUp = Math.floor(val / 10); } myout(myconv(output,0)); }