結果
問題 | No.8022 縛りFizzBuzz (Easy) |
ユーザー |
![]() |
提出日時 | 2020-07-03 13:56:52 |
言語 | JavaScript (node v23.5.0) |
結果 |
AC
|
実行時間 | 68 ms / 2,000 ms |
コード長 | 1,782 bytes |
コンパイル時間 | 195 ms |
コンパイル使用メモリ | 5,248 KB |
実行使用メモリ | 39,168 KB |
最終ジャッジ日時 | 2024-09-16 17:02:09 |
合計ジャッジ時間 | 1,092 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
ソースコード
// いっそプリミティブ値のリテラルも書かないっていうのはどうだconst zero = +[];const one = +!![];const two = one + one;const three = one + two;const four = two * two;const five = two + three;const six = two * three;const seven = three + four;const eight = two * four;const nine = three * three;const ten = two * five;const fifteen = three * five;const handred = ten * ten;const slash = String.fromCharCode(four * ten + seven);const B = String.fromCharCode(six * ten + six);const F = String.fromCharCode(seven * ten);const d = String.fromCharCode(handred);const e = String.fromCharCode(handred + one);const f = String.fromCharCode(handred + two);const i = String.fromCharCode(handred + five);const n = String.fromCharCode(handred + ten);const s = String.fromCharCode(handred + fifteen);const t = String.fromCharCode(handred + ten + six);const u = String.fromCharCode(handred + ten + seven);const v = String.fromCharCode(handred + ten + eight);const z = String.fromCharCode(handred + two * ten + two);const Fizz = F + i + z + z;const Buzz = B + u + z + z;const FizzBuzz = Fizz + Buzz;const fs = f + s;const stdin = slash + d + e + v + slash + s + t + d + i + n;const utf = u + t + f;const encoding = utf + eight;function Main(input) {const N = +input;for (let i = one; i <= N; ++i) {let str;if (i % fifteen == zero) {str = FizzBuzz;} else if (i % five == zero) {str = Buzz;} else if (i % three == zero) {str = Fizz;} else {str = i;}console.log(str);}}// Don't edit this line!// と言われてもいじらんと解答できんよMain(require(fs).readFileSync(stdin, encoding));