結果

問題 No.311 z in FizzBuzzString
ユーザー Yug_min_null
提出日時 2021-09-12 13:48:47
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 287 bytes
コンパイル時間 1,742 ms
コンパイル使用メモリ 187,776 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-24 22:37:40
合計ジャッジ時間 2,307 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _GLIBCXX_DEBUG
#define ll long long
#include <bits/stdc++.h>
using namespace std;

int main() {
  ll N; cin >> N;
  ll ans = 0;
  if(N >= 15){
    ans += (N/15)*16;
    N %= 15;
  }
  for(int i = 1; i <= N; i++){
    if(N%3 == 0 or N%5 == 0) ans++;
  }
  cout << ans << endl;
}

0