結果
問題 |
No.316 もっと刺激的なFizzBuzzをください
|
ユーザー |
![]() |
提出日時 | 2025-02-05 01:49:56 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 989 bytes |
コンパイル時間 | 2,223 ms |
コンパイル使用メモリ | 160,176 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2025-02-05 01:50:01 |
合計ジャッジ時間 | 3,790 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 4 |
other | AC * 7 WA * 26 |
ソースコード
#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; }