Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fe9ff7c

Browse files
committed
Lv1_부족한금액계산하기
1 parent 5a0c89a commit fe9ff7c

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using namespace std;
2+
3+
long long solution(int price, int money, int count){
4+
long long answer = 0;
5+
for (int i = 1; i <= count; ++i)
6+
answer += price * i;
7+
8+
if (money> answer)
9+
return 0;
10+
else
11+
return -(money-answer);
12+
}

‎Programmers/Programmers.vcxproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@
7979
<ClCompile Include="Lv1\Lv1_문자열을정수로바꾸기.cpp">
8080
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
8181
</ClCompile>
82+
<ClCompile Include="Lv1\Lv1_부족한금액계산하기.cpp">
83+
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
84+
</ClCompile>
8285
<ClCompile Include="Lv1\Lv1_서울에서김서방찾기.cpp">
8386
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
8487
</ClCompile>

‎Programmers/Programmers.vcxproj.filters

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,5 +516,8 @@
516516
<ClCompile Include="Lv1\Lv1_나머지가1이되는수찾기.cpp">
517517
<Filter>소스 파일</Filter>
518518
</ClCompile>
519+
<ClCompile Include="Lv1\Lv1_부족한금액계산하기.cpp">
520+
<Filter>소스 파일</Filter>
521+
</ClCompile>
519522
</ItemGroup>
520523
</Project>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /