Submission #615943
Source Code Expand
#include <iostream> #include <cstdlib> #include <algorithm> #define MAX 1000000000 void era(bool is_niconico[]) { for (long long i = 0; i < MAX; ++i) { is_niconico[i] = false; } for (long long i = 1; i < MAX; ++i) { if (i * 25 >= MAX) break; is_niconico[i * 25] = true; } for (long long i = 1; i < MAX; ++i) { if (i * 2525 >= MAX) break; is_niconico[i * 2525] = true; } for (long long i = 1; i < MAX; ++i) { if (i * 252525 >= MAX) break; is_niconico[i * 252525] = true; } for (long long i = 1; i < MAX; ++i) { if (i * 25252525 >= MAX) break; is_niconico[i * 25252525] = true; } } bool is_niconico[MAX]; int main(int argc, char* argv[]) { long long n; std::cin >> n; era(is_niconico); long long ans = 0; for (long long i = 1; i <= n; ++i) { if (is_niconico[i]) { ++ans; } } std::cout << ans; return EXIT_SUCCESS; }
Submission Info
Submission Time | |
---|---|
Task | A - ニコニコ数 |
User | Komori |
Language | C++ (GCC 4.9.2) |
Score | 0 |
Code Size | 965 Byte |
Status | MLE |
Exec Time | 2664 ms |
Memory | 977444 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 | MLE | 2326 ms | 977316 KB |
sample_02.txt | MLE | 2330 ms | 977308 KB |
test_01.txt | MLE | 2226 ms | 977320 KB |
test_02.txt | MLE | 2219 ms | 977320 KB |
test_03.txt | MLE | 2214 ms | 977312 KB |
test_04.txt | MLE | 2224 ms | 977320 KB |
test_05.txt | MLE | 2342 ms | 977312 KB |
test_06.txt | MLE | 2416 ms | 977312 KB |
test_07.txt | MLE | 2393 ms | 977316 KB |
test_08.txt | TLE | 2664 ms | 977444 KB |
test_09.txt | TLE | 2661 ms | 977432 KB |
test_10.txt | TLE | 2659 ms | 977436 KB |
test_11.txt | TLE | 2663 ms | 977388 KB |
test_12.txt | TLE | 2664 ms | 977388 KB |
test_13.txt | MLE | 2409 ms | 977316 KB |
test_14.txt | MLE | 2326 ms | 977320 KB |
test_15.txt | MLE | 2245 ms | 977316 KB |