結果
| 問題 | No.311 z in FizzBuzzString |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-10-02 18:24:30 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 473 bytes |
| 記録 | |
| コンパイル時間 | 1,603 ms |
| コンパイル使用メモリ | 166,296 KB |
| 実行使用メモリ | 14,016 KB |
| 最終ジャッジ日時 | 2024-09-24 22:00:16 |
| 合計ジャッジ時間 | 4,332 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 7 TLE * 1 -- * 3 |
ソースコード
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i = (a); i < (b); ++i)
#define REP(i,n) FOR(i,0,n)
#define SZ(n) (int)(n).size()
#define ALL(n) (n).begin(), (n).end()
#define MOD 1000000007
using namespace std;
typedef long long LL;
typedef vector<int> VI;
int main() {
LL n;
cin >> n;
LL ans = 0;
while (n--) {
if (n % 3 == 0 && n % 5 == 0) ans += 4;
else if (n % 5 == 0 || n % 3 == 0) ans += 2;
}
cout << ans << endl;
return 0;
}