結果

問題 No.316 もっと刺激的なFizzBuzzをください
ユーザー vjudge1
提出日時 2025-02-05 01:45:48
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 989 bytes
コンパイル時間 2,106 ms
コンパイル使用メモリ 162,016 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2025-02-05 01:45:53
合計ジャッジ時間 3,822 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 3
other AC * 10 WA * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

#define int long long

typedef vector<int> vi;
typedef pair<int, int> pi;
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define popcount __builtin_popcountll
const int MOD = 1e9 + 7;

void swapp(int &a, int &b) {
    a = a ^ b;
    b = a ^ b;
    a = a ^ b;
}

int mul(int a, int b) {
    if (log10l(a) + log10l(b) > 18.3) return 3e18;
    return a * b;
}

#define forn(i, a, b) for (int i = a; i < b; i++)

bool comp(pair<int, int> a, pair<int, int> b) {
    if (a.first == b.first) {
        return a.second > b.second;
    }
    return a.first < b.first;
}

void solve() {
    int ta ; 
    cin >> ta; 
    int a,b,c;
    cin >> a>> b >> c; 
    int cnt = 0 ;
    cnt = ta/a + ta/b + ta/c - ta/(a*b) - ta /(a*c) - ta/(b*c) + ta/(a*b*c);
    cout<<cnt<<"\n";
}

signed main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    int t = 1;
    // cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}
0