Atcoder

· PS/Atcoder
A - Scoreboard n개의 점수가 주어지고, 각 점수의 최종 합이 더 큰 사람을 출력하는 문제 1 2 3 4 5 6 7 8 9 10 11 12 #include using namespace std; int main() { int n, x, y, a=0, b=0; cin >> n; for (int i = 0; i > x >> y; a+=x, b+=y; } if (a > b) cout
· PS/Atcoder
A - Long Loong n이 주어졌을 때, L, o, n, g로 이루어진 문자열을 출력하는 문제 문자열의 길이는 n + 3이고, 문자열 중 o의 개수가 n개여야한다. 간단하게 L을 출력하고, n개의 o를 출력하고, ng를 출력시키면 된다. 1 2 3 4 5 6 7 8 #include using namespace std; int main(){ int n; cin >> n; cout n; while(1){ cnt*=5; if(cnt>n){ cnt/=5; break; } } check(n, cnt); cout n; for(int i=1; i> dp[i]; for(int i=1; i=0; i--) r[i]=min(r[i+1]+1, dp[i]); for(int i=1; i
sy46
'Atcoder' 태그의 글 목록