結果

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

ソースコード

diff #

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

    return 0;
}
0