제출 #418453

#제출 시각아이디문제언어결과실행 시간메모리
418453DJeniUpSequence (BOI14_sequence)C++17
0 / 100
3 ms308 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll,ll>pairll; typedef pair<ll,pairll>pairlll; typedef pair<pairll,ll>pairllL; typedef pair<pairll,pairll>pairllll; typedef pair<ll,pairllll>pairlllll; typedef long double ld; typedef pair<ll,string>pairls; #define endl '\n' #define INF 100000000007 #define M 1000000000 #define P 316 #define MOD 998244353 #define pb push_back #define fr first #define sc second ll k,d,res,r; int main() { cin>>k; for(int i=1;i<=k;i++){ cin>>d; } k--; if(d==9){ res=9; r=10; while(res+k>=r){ res+=8*r; r*=10; } cout<<res<<endl; return 0; } if(d==0){ d=10; } res=d; r=0; while(r<k){ if(r==0)r=10; else r*=10; res*=10; } cout<<res<<endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...