알고리즘 문제 풀이/1DP_과제(~180615)
171224_1789_수들의 합
//https://www.acmicpc.net/problem/1789 #include using namespace std; int main(){ long long S; cin >> S; int i=0; while(1) { i++; S-=i; if(S
//https://www.acmicpc.net/problem/1789 #include using namespace std; int main(){ long long S; cin >> S; int i=0; while(1) { i++; S-=i; if(S
//https://www.acmicpc.net/problem/10886 #include using namespace std; int main(){ bool x; int N; cin >> N; int cnt=0; for(int i=0; i> x; if(x) cnt++; else //x==0 cnt--; } if(cnt>0) cout
//https://www.acmicpc.net/problem/10798 #include #include using namespace std;char word[5][15];int main(){ for(int i=0; i> word[i]; for(int i=0; i
//https://www.acmicpc.net/problem/5565 #include using namespace std; int main(){ int total, now; cin >> total; for(int i=0; i> now; total-=now; } cout