結果

問題 No.311 z in FizzBuzzString
ユーザー kawadumax
提出日時 2016-02-09 22:33:28
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 425 bytes
コンパイル時間 456 ms
コンパイル使用メモリ 60,176 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-24 21:33:34
合計ジャッジ時間 1,004 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include "math.h"
using namespace std;
int main() {
    // insert code here...
    double n;
    double threeNum,fiveNum;
    double fifteenNum;
    cin >> n;
    
    fifteenNum = floor(n/15);
    threeNum = floor(n/3) -fifteenNum;
    fiveNum = floor(n/5) -fifteenNum;
    
    double ans = 4 * fifteenNum + 2 * (threeNum + fiveNum);
    cout.precision(18);
    cout << ans <<endl;
    

    return 0;
}
0