Submission #615959


Source Code Expand

#define _CRT_SECURE_NO_WARNINGS
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <set>
#include <map>
#include <queue>
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <ctime>
#include <cstring>
#include <cctype>
#include <cassert>
#include <limits>
#include <functional>
#include <stack>
#include <array>
#include <fstream>
#include <deque>
#include <bitset>
using namespace std;
#define REP(i,n) for(int (i) = 0;(i) < (n) ; ++(i))
#define REPS(a,i,n) for(int (i) = (a) ; (i) < (n) ; ++(i))
#if defined(_MSC_VER)||__cplusplus > 199711L
#define AUTO(r,v) auto r = (v)
#else
#define AUTO(r,v) typeof(v) r = (v)
#endif
#define ALL(c) (c).begin() , (c).end()
#define EACH(it,c) for(AUTO(it,(c).begin());it != (c).end();)
#define LL long long
#define int LL
#define inf  ((int)1 << 54)
#define mod 1000000007
#define QUICK_CIN ios::sync_with_stdio(false); cin.tie(0);
#define lowb lower_bound
#define upb upper_bound
#define ZERO(c,n) memset(&c[0],0,sizeof(int)*n)
#define ZERO2(c,n) memset(&c[0][0],0,sizeof(int)*n)
#define debug_input fstream cin("input.txt");ofstream cout("output.txt");
#define pb(a) push_back(a)
template<class T>void scan(vector<T>& a, int n, istream& cin) { T c; REP(i, n) { cin >> c; a.push_back(c); } }
using vs = vector<string>; using vi = vector<int>; using pii = pair<int, int>; using psi = pair<string, int>; using vvi = vector<vi>;
template<class T>bool valid(T x, T w) { return 0 <= x&&x < w; }
int dx[4] = { 1, -1, 0, 0 }; int dy[4] = { 0, 0, 1, -1 };
//-----------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------

int n;
vi a;

int dp[25252526];

signed main()
{
	QUICK_CIN;
	//debug_input;

	int k = 25;

	cin >> n;

	REP(i, 4) {
		a.push_back(k);
		k *= 100;
		k += 25;
	}

	int count = 0;

	REPS(1,i, 25252526) {
		bool f = false;
		for (auto x : a) {
			if (i % x == 0) {
				f = true;
			}
		}
		dp[i] = dp[i - 1];
		if (f) {
			dp[i]++;
		}
	}

	if (n > 25252525)
		n = 25252525;
	cout << dp[n] << endl;

}

Submission Info

Submission Time
Task A - ニコニコ数
User lovablepleiad
Language C++11 (GCC 4.9.2)
Score 0
Code Size 2337 Byte
Status WA
Exec Time 2045 ms
Memory 198108 KB

Judge Result

Set Name Sample Subtask1
Score / Max Score 0 / 0 0 / 60
Status
AC × 2
AC × 12
WA × 5
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
Subtask1 sample_01.txt, sample_02.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt
Case Name Status Exec Time Memory
sample_01.txt AC 1994 ms 198108 KB
sample_02.txt AC 2041 ms 198056 KB
test_01.txt AC 2031 ms 198076 KB
test_02.txt AC 2030 ms 198056 KB
test_03.txt AC 2030 ms 198052 KB
test_04.txt AC 2026 ms 198048 KB
test_05.txt AC 2028 ms 198056 KB
test_06.txt AC 2028 ms 198056 KB
test_07.txt AC 2035 ms 198052 KB
test_08.txt WA 2005 ms 198056 KB
test_09.txt WA 2001 ms 198044 KB
test_10.txt WA 2045 ms 198048 KB
test_11.txt WA 2031 ms 198040 KB
test_12.txt WA 1995 ms 198048 KB
test_13.txt AC 1993 ms 198056 KB
test_14.txt AC 1999 ms 198048 KB
test_15.txt AC 1993 ms 198044 KB