Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e96c4ff

Browse files
committedFeb 21, 2023
주사위 게임
1 parent 9f61873 commit e96c4ff

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed
 

‎2022_Winter/2022_Winter.vcxproj

+4-1
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,13 @@
145145
<ClCompile Include="로프.cpp">
146146
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
147147
</ClCompile>
148-
<ClCompile Include="예산.cpp" />
148+
<ClCompile Include="예산.cpp">
149+
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
150+
</ClCompile>
149151
<ClCompile Include="유기농 배추_re.cpp">
150152
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
151153
</ClCompile>
154+
<ClCompile Include="주사위 게임.cpp" />
152155
<ClCompile Include="최대 힙_re.cpp">
153156
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
154157
</ClCompile>

‎2022_Winter/2022_Winter.vcxproj.filters

+3
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,8 @@
3030
<ClCompile Include="예산.cpp">
3131
<Filter>소스 파일</Filter>
3232
</ClCompile>
33+
<ClCompile Include="주사위 게임.cpp">
34+
<Filter>소스 파일</Filter>
35+
</ClCompile>
3336
</ItemGroup>
3437
</Project>

‎2022_Winter/주사위 게임.cpp

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include <iostream>
2+
using namespace std;
3+
4+
int main(void) {
5+
int one = 100, two = 100;
6+
int n;
7+
cin >> n;
8+
for (int i = 0; i < 4; i++) {
9+
int A, B;
10+
cin >> A >> B;
11+
if (A > B) {
12+
two = two - A;
13+
}
14+
else if (A < B) {
15+
one = one - B;
16+
}
17+
}
18+
cout << one << '\n' << two;
19+
}

0 commit comments

Comments
 (0)
Please sign in to comment.