結果
問題 | No.1593 Perfect Distance |
ユーザー | rickyorange |
提出日時 | 2021-07-09 22:59:37 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 896 bytes |
コンパイル時間 | 1,431 ms |
コンパイル使用メモリ | 165,104 KB |
実行使用メモリ | 4,504 KB |
最終ジャッジ日時 | 2023-09-14 10:32:21 |
合計ジャッジ時間 | 2,423 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,376 KB |
testcase_01 | AC | 1 ms
4,376 KB |
testcase_02 | AC | 1 ms
4,376 KB |
testcase_03 | AC | 1 ms
4,376 KB |
testcase_04 | AC | 2 ms
4,380 KB |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 2 ms
4,380 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | AC | 2 ms
4,376 KB |
testcase_18 | AC | 1 ms
4,376 KB |
testcase_19 | AC | 2 ms
4,380 KB |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i,a,n) for(int i=(a); i<(n); i++) #define rrep(i,a,n) for(int i=(a); i>=(n); i--) #define all(n) begin(n),end(n) #define rall(n) rbegin(n),rend(n) //#define yn(bool) if(bool){cout<<Yes<<endl;}else{cout<<No<<endl;} #define fore(i,a) for(auto &i:a) using ll = long long; using vi = vector<int>; using vl = vector<ll>; ll myceil(ll a,ll b){return (a+(b-1))/b;} ll myfloor(ll a,ll b){return a/b;} template <typename T> inline bool chmin(T& a, const T& b) {bool compare = a > b; if (a > b) a = b; return compare;} template <typename T> inline bool chmax(T& a, const T& b) {bool compare = a < b; if (a < b) a = b; return compare;} void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); } void _main() { ll n; cin>>n; int a=0; while(n>0) { if(n%5==0) a++; n/=5; } cout<<a*2<<endl; }