Submission #1769424
Source Code Expand
#include<bits/stdc++.h> #define vi vector<int> #define vvi vector<vector<int> > #define vl vector<ll> #define vvl vector<vector<ll>> #define vb vector<bool> #define vc vector<char> #define vs vector<string> using ll = long long; using ld =long double; #define int ll #define INF 1e9 #define EPS 0.0000000001 #define rep(i,n) for(int i=0;i<n;i++) #define loop(i,s,n) for(int i=s;i<n;i++) #define all(in) in.begin(), in.end() template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; } template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; } #define MAX 9999999 using namespace std; typedef pair<int, int> pii; typedef pair<int,pii> piii; #define mp make_pair signed main(){ int n; cin>>n; string niko="25"; string s; int ans=0; map<int,int>mp; while(true){ s+=niko; int num=stoi(s); if(num>n)break; int cnt=1; int res=num; while(true){ cnt++; if(!mp[res]){ ans++; mp[res]++; } res=num*cnt; if(res>n)break; } } cout<<ans<<endl; }
Submission Info
Submission Time | |
---|---|
Task | A - ニコニコ数 |
User | yebityon |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1191 Byte |
Status | TLE |
Exec Time | 2665 ms |
Memory | 155136 KB |
Judge Result
Set Name | Sample | Subtask1 | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 60 | ||||||
Status |
|
|
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 | 1 ms | 256 KB |
sample_02.txt | AC | 772 ms | 50688 KB |
test_01.txt | AC | 1 ms | 256 KB |
test_02.txt | AC | 1 ms | 256 KB |
test_03.txt | AC | 1 ms | 256 KB |
test_04.txt | AC | 4 ms | 896 KB |
test_05.txt | AC | 11 ms | 2176 KB |
test_06.txt | AC | 1008 ms | 63360 KB |
test_07.txt | AC | 152 ms | 13440 KB |
test_08.txt | TLE | 2665 ms | 154624 KB |
test_09.txt | TLE | 2664 ms | 155136 KB |
test_10.txt | TLE | 2664 ms | 150400 KB |
test_11.txt | TLE | 2665 ms | 150784 KB |
test_12.txt | TLE | 2665 ms | 151680 KB |
test_13.txt | AC | 1021 ms | 63360 KB |
test_14.txt | AC | 1 ms | 256 KB |
test_15.txt | AC | 1 ms | 256 KB |