Submission #00137
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | /// {{{ #include "bits/stdc++.h" #define ALL(x) x.begin(), x.end() #define iostreamBooster() do{cin.tie(nullptr);ios::sync_with_stdio(false);}while(0) #define rep(i, s, t) for(int i = int(s); i < int(t); ++i) using namespace std; typedef long long i64; typedef pair< int , int > pii; template < class A, class B> inline bool chmax(A &a, const B &b){ return b>a ? a=b,1 : 0;} template < class A, class B> inline bool chmin(A &a, const B &b){ return b<a ? a=b,1 : 0;} constexpr int INF = 0x3f3f3f3f; constexpr i64 LINF = 0x3f3f3f3f3f3f3f3fLL; // }}} signed main() { i64 N; cin >> N; i64 sum = 0; for (i64 n = 5; n <= N; n *= 5) { sum += (N / n); } cout << sum << endl; return 0; } |
ステータス
項目 | データ |
---|---|
問題 | 0006 - 虚構主義 |
ユーザー名 | Arumakan_ei1727 |
投稿日時 | 2019-05-27 17:43:45 |
言語 | C++14 |
状態 | Accepted |
得点 | 1 |
ソースコード長 | 733 Byte |
最大実行時間 | 34 ms |
最大メモリ使用量 | 684 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 0.94444444444444 / 0.94444444444444 | * |
2 | long long int | 0.055555555555556 / 0.055555555555556 | in0[0-4] |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # | |
---|---|---|---|---|---|
in01 | AC | 34 ms | 476 KB |
1
|
2
|
in02 | AC | 19 ms | 576 KB |
1
|
2
|
in03 | AC | 26 ms | 684 KB |
1
|
2
|
in04 | AC | 22 ms | 652 KB |
1
|
2
|
in05 | AC | 21 ms | 620 KB |
1
|
|
in06 | AC | 21 ms | 588 KB |
1
|
|
in07 | AC | 19 ms | 560 KB |
1
|
|
in08 | AC | 19 ms | 528 KB |
1
|
|
in09 | AC | 21 ms | 504 KB |
1
|
|
in10 | AC | 15 ms | 480 KB |
1
|