結果

問題 No.311 z in FizzBuzzString
ユーザー ontama_12ontama_12
提出日時 2016-09-28 11:07:40
言語 JavaScript
(node v21.7.1)
結果
TLE  
実行時間 -
コード長 721 bytes
コンパイル時間 35 ms
コンパイル使用メモリ 5,152 KB
実行使用メモリ 41,828 KB
最終ジャッジ日時 2023-10-25 02:46:56
合計ジャッジ時間 3,589 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
41,828 KB
testcase_01 AC 69 ms
37,520 KB
testcase_02 AC 66 ms
37,480 KB
testcase_03 AC 66 ms
37,480 KB
testcase_04 AC 67 ms
37,480 KB
testcase_05 AC 68 ms
37,480 KB
testcase_06 AC 66 ms
37,480 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

    /////////////////////////////////No.311 z in FizzBuzzString 
    //入力文字読み取り
   var inputall = require('fs').readFileSync('/dev/stdin', 'utf8');

    //すべて受け取り改行で区切って格納
   var inputnumber = Number(inputall);

    var count =0
   for (var i = 1; i <= inputnumber; i++) {
        if (i % 3 == 0 && i % 5 == 0)  // iが3の倍数かつ5の倍数
            count += 4
        else if (i % 3 == 0)  // iが3の倍数(かつ5の倍数でない)
           count+=2
        else if (i % 5 == 0)  // iが5の倍数(かつ3の倍数でない)
            count += 2
        else {
        }// iが3の倍数でも5の倍数でもない
          
     }

   console.log(count);
0