Skip to content

Commit 24e18cb

Browse files
committed
add boj
1 parent 5e0b546 commit 24e18cb

File tree

265 files changed

+13938
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

265 files changed

+13938
-0
lines changed

.DS_Store

18 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cells": [],
3+
"metadata": {},
4+
"nbformat": 4,
5+
"nbformat_minor": 4
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cells": [],
3+
"metadata": {},
4+
"nbformat": 4,
5+
"nbformat_minor": 4
6+
}
Lines changed: 278 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,278 @@
1+
// !$*UTF8*$!
2+
{
3+
archiveVersion = 1;
4+
classes = {
5+
};
6+
objectVersion = 50;
7+
objects = {
8+
9+
/* Begin PBXBuildFile section */
10+
3E9BF09123BC659F00E9DDC5 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 3E9BF09023BC659F00E9DDC5 /* main.c */; };
11+
/* End PBXBuildFile section */
12+
13+
/* Begin PBXCopyFilesBuildPhase section */
14+
3E9BF08B23BC659F00E9DDC5 /* CopyFiles */ = {
15+
isa = PBXCopyFilesBuildPhase;
16+
buildActionMask = 2147483647;
17+
dstPath = /usr/share/man/man1/;
18+
dstSubfolderSpec = 0;
19+
files = (
20+
);
21+
runOnlyForDeploymentPostprocessing = 1;
22+
};
23+
/* End PBXCopyFilesBuildPhase section */
24+
25+
/* Begin PBXFileReference section */
26+
3E9BF08D23BC659F00E9DDC5 /* 1016 제곱ㄴㄴ수 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "1016 제곱ㄴㄴ수"; sourceTree = BUILT_PRODUCTS_DIR; };
27+
3E9BF09023BC659F00E9DDC5 /* main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; };
28+
/* End PBXFileReference section */
29+
30+
/* Begin PBXFrameworksBuildPhase section */
31+
3E9BF08A23BC659F00E9DDC5 /* Frameworks */ = {
32+
isa = PBXFrameworksBuildPhase;
33+
buildActionMask = 2147483647;
34+
files = (
35+
);
36+
runOnlyForDeploymentPostprocessing = 0;
37+
};
38+
/* End PBXFrameworksBuildPhase section */
39+
40+
/* Begin PBXGroup section */
41+
3E9BF08423BC659F00E9DDC5 = {
42+
isa = PBXGroup;
43+
children = (
44+
3E9BF08F23BC659F00E9DDC5 /* 1016 제곱ㄴㄴ수 */,
45+
3E9BF08E23BC659F00E9DDC5 /* Products */,
46+
);
47+
sourceTree = "<group>";
48+
};
49+
3E9BF08E23BC659F00E9DDC5 /* Products */ = {
50+
isa = PBXGroup;
51+
children = (
52+
3E9BF08D23BC659F00E9DDC5 /* 1016 제곱ㄴㄴ수 */,
53+
);
54+
name = Products;
55+
sourceTree = "<group>";
56+
};
57+
3E9BF08F23BC659F00E9DDC5 /* 1016 제곱ㄴㄴ수 */ = {
58+
isa = PBXGroup;
59+
children = (
60+
3E9BF09023BC659F00E9DDC5 /* main.c */,
61+
);
62+
path = "1016 제곱ㄴㄴ수";
63+
sourceTree = "<group>";
64+
};
65+
/* End PBXGroup section */
66+
67+
/* Begin PBXNativeTarget section */
68+
3E9BF08C23BC659F00E9DDC5 /* 1016 제곱ㄴㄴ수 */ = {
69+
isa = PBXNativeTarget;
70+
buildConfigurationList = 3E9BF09423BC659F00E9DDC5 /* Build configuration list for PBXNativeTarget "1016 제곱ㄴㄴ수" */;
71+
buildPhases = (
72+
3E9BF08923BC659F00E9DDC5 /* Sources */,
73+
3E9BF08A23BC659F00E9DDC5 /* Frameworks */,
74+
3E9BF08B23BC659F00E9DDC5 /* CopyFiles */,
75+
);
76+
buildRules = (
77+
);
78+
dependencies = (
79+
);
80+
name = "1016 제곱ㄴㄴ수";
81+
productName = "1016 제곱ㄴㄴ수";
82+
productReference = 3E9BF08D23BC659F00E9DDC5 /* 1016 제곱ㄴㄴ수 */;
83+
productType = "com.apple.product-type.tool";
84+
};
85+
/* End PBXNativeTarget section */
86+
87+
/* Begin PBXProject section */
88+
3E9BF08523BC659F00E9DDC5 /* Project object */ = {
89+
isa = PBXProject;
90+
attributes = {
91+
LastUpgradeCheck = 1100;
92+
ORGANIZATIONNAME = "정익효";
93+
TargetAttributes = {
94+
3E9BF08C23BC659F00E9DDC5 = {
95+
CreatedOnToolsVersion = 11.0;
96+
};
97+
};
98+
};
99+
buildConfigurationList = 3E9BF08823BC659F00E9DDC5 /* Build configuration list for PBXProject "1016 제곱ㄴㄴ수" */;
100+
compatibilityVersion = "Xcode 9.3";
101+
developmentRegion = en;
102+
hasScannedForEncodings = 0;
103+
knownRegions = (
104+
en,
105+
Base,
106+
);
107+
mainGroup = 3E9BF08423BC659F00E9DDC5;
108+
productRefGroup = 3E9BF08E23BC659F00E9DDC5 /* Products */;
109+
projectDirPath = "";
110+
projectRoot = "";
111+
targets = (
112+
3E9BF08C23BC659F00E9DDC5 /* 1016 제곱ㄴㄴ수 */,
113+
);
114+
};
115+
/* End PBXProject section */
116+
117+
/* Begin PBXSourcesBuildPhase section */
118+
3E9BF08923BC659F00E9DDC5 /* Sources */ = {
119+
isa = PBXSourcesBuildPhase;
120+
buildActionMask = 2147483647;
121+
files = (
122+
3E9BF09123BC659F00E9DDC5 /* main.c in Sources */,
123+
);
124+
runOnlyForDeploymentPostprocessing = 0;
125+
};
126+
/* End PBXSourcesBuildPhase section */
127+
128+
/* Begin XCBuildConfiguration section */
129+
3E9BF09223BC659F00E9DDC5 /* Debug */ = {
130+
isa = XCBuildConfiguration;
131+
buildSettings = {
132+
ALWAYS_SEARCH_USER_PATHS = NO;
133+
CLANG_ANALYZER_NONNULL = YES;
134+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
135+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
136+
CLANG_CXX_LIBRARY = "libc++";
137+
CLANG_ENABLE_MODULES = YES;
138+
CLANG_ENABLE_OBJC_ARC = YES;
139+
CLANG_ENABLE_OBJC_WEAK = YES;
140+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
141+
CLANG_WARN_BOOL_CONVERSION = YES;
142+
CLANG_WARN_COMMA = YES;
143+
CLANG_WARN_CONSTANT_CONVERSION = YES;
144+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
145+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
146+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
147+
CLANG_WARN_EMPTY_BODY = YES;
148+
CLANG_WARN_ENUM_CONVERSION = YES;
149+
CLANG_WARN_INFINITE_RECURSION = YES;
150+
CLANG_WARN_INT_CONVERSION = YES;
151+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
152+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
153+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
154+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
155+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
156+
CLANG_WARN_STRICT_PROTOTYPES = YES;
157+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
158+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
159+
CLANG_WARN_UNREACHABLE_CODE = YES;
160+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
161+
COPY_PHASE_STRIP = NO;
162+
DEBUG_INFORMATION_FORMAT = dwarf;
163+
ENABLE_STRICT_OBJC_MSGSEND = YES;
164+
ENABLE_TESTABILITY = YES;
165+
GCC_C_LANGUAGE_STANDARD = gnu11;
166+
GCC_DYNAMIC_NO_PIC = NO;
167+
GCC_NO_COMMON_BLOCKS = YES;
168+
GCC_OPTIMIZATION_LEVEL = 0;
169+
GCC_PREPROCESSOR_DEFINITIONS = (
170+
"DEBUG=1",
171+
"$(inherited)",
172+
);
173+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
174+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
175+
GCC_WARN_UNDECLARED_SELECTOR = YES;
176+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
177+
GCC_WARN_UNUSED_FUNCTION = YES;
178+
GCC_WARN_UNUSED_VARIABLE = YES;
179+
MACOSX_DEPLOYMENT_TARGET = 10.14;
180+
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
181+
MTL_FAST_MATH = YES;
182+
ONLY_ACTIVE_ARCH = YES;
183+
SDKROOT = macosx;
184+
};
185+
name = Debug;
186+
};
187+
3E9BF09323BC659F00E9DDC5 /* Release */ = {
188+
isa = XCBuildConfiguration;
189+
buildSettings = {
190+
ALWAYS_SEARCH_USER_PATHS = NO;
191+
CLANG_ANALYZER_NONNULL = YES;
192+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
193+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
194+
CLANG_CXX_LIBRARY = "libc++";
195+
CLANG_ENABLE_MODULES = YES;
196+
CLANG_ENABLE_OBJC_ARC = YES;
197+
CLANG_ENABLE_OBJC_WEAK = YES;
198+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
199+
CLANG_WARN_BOOL_CONVERSION = YES;
200+
CLANG_WARN_COMMA = YES;
201+
CLANG_WARN_CONSTANT_CONVERSION = YES;
202+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
203+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
204+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
205+
CLANG_WARN_EMPTY_BODY = YES;
206+
CLANG_WARN_ENUM_CONVERSION = YES;
207+
CLANG_WARN_INFINITE_RECURSION = YES;
208+
CLANG_WARN_INT_CONVERSION = YES;
209+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
210+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
211+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
212+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
213+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
214+
CLANG_WARN_STRICT_PROTOTYPES = YES;
215+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
216+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
217+
CLANG_WARN_UNREACHABLE_CODE = YES;
218+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
219+
COPY_PHASE_STRIP = NO;
220+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
221+
ENABLE_NS_ASSERTIONS = NO;
222+
ENABLE_STRICT_OBJC_MSGSEND = YES;
223+
GCC_C_LANGUAGE_STANDARD = gnu11;
224+
GCC_NO_COMMON_BLOCKS = YES;
225+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
226+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
227+
GCC_WARN_UNDECLARED_SELECTOR = YES;
228+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
229+
GCC_WARN_UNUSED_FUNCTION = YES;
230+
GCC_WARN_UNUSED_VARIABLE = YES;
231+
MACOSX_DEPLOYMENT_TARGET = 10.14;
232+
MTL_ENABLE_DEBUG_INFO = NO;
233+
MTL_FAST_MATH = YES;
234+
SDKROOT = macosx;
235+
};
236+
name = Release;
237+
};
238+
3E9BF09523BC659F00E9DDC5 /* Debug */ = {
239+
isa = XCBuildConfiguration;
240+
buildSettings = {
241+
CODE_SIGN_STYLE = Automatic;
242+
PRODUCT_NAME = "$(TARGET_NAME)";
243+
};
244+
name = Debug;
245+
};
246+
3E9BF09623BC659F00E9DDC5 /* Release */ = {
247+
isa = XCBuildConfiguration;
248+
buildSettings = {
249+
CODE_SIGN_STYLE = Automatic;
250+
PRODUCT_NAME = "$(TARGET_NAME)";
251+
};
252+
name = Release;
253+
};
254+
/* End XCBuildConfiguration section */
255+
256+
/* Begin XCConfigurationList section */
257+
3E9BF08823BC659F00E9DDC5 /* Build configuration list for PBXProject "1016 제곱ㄴㄴ수" */ = {
258+
isa = XCConfigurationList;
259+
buildConfigurations = (
260+
3E9BF09223BC659F00E9DDC5 /* Debug */,
261+
3E9BF09323BC659F00E9DDC5 /* Release */,
262+
);
263+
defaultConfigurationIsVisible = 0;
264+
defaultConfigurationName = Release;
265+
};
266+
3E9BF09423BC659F00E9DDC5 /* Build configuration list for PBXNativeTarget "1016 제곱ㄴㄴ수" */ = {
267+
isa = XCConfigurationList;
268+
buildConfigurations = (
269+
3E9BF09523BC659F00E9DDC5 /* Debug */,
270+
3E9BF09623BC659F00E9DDC5 /* Release */,
271+
);
272+
defaultConfigurationIsVisible = 0;
273+
defaultConfigurationName = Release;
274+
};
275+
/* End XCConfigurationList section */
276+
};
277+
rootObject = 3E9BF08523BC659F00E9DDC5 /* Project object */;
278+
}

1016 제곱ㄴㄴ수/1016 제곱ㄴㄴ수.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>1016 제곱ㄴㄴ수.xcscheme_^#shared#^_</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>0</integer>
11+
</dict>
12+
</dict>
13+
</dict>
14+
</plist>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#include<stdio.h>
2+
#include<math.h>
3+
int main(){
4+
long long max,min;
5+
scanf("%lld%lld",&min,&max);
6+
int n=pow(max,0.5);
7+
int arr[1000001],i,j,squ,count=0,size=max-min+1;
8+
int num[size];
9+
for(i=0;i<size;i++){
10+
num[i]=0;
11+
}
12+
arr[1]=1;
13+
arr[2]=1;
14+
for(i=2;i<1000001;i++){
15+
arr[i]=0;
16+
}
17+
for(i=2;i<=n;i++){
18+
if(arr[i]==0){
19+
for(j=2;i*j<=n;j++){
20+
arr[i*j]=1;
21+
}
22+
}
23+
}
24+
for(i=2;i<=n;i++){
25+
if(arr[i]==0){
26+
squ=pow(i,2.0);
27+
for(j=1;j*squ<=max;j++){
28+
if(j*squ>=min&&num[max-j*squ]==0){
29+
num[max-j*squ]=1;
30+
}
31+
}
32+
}
33+
}
34+
for(i=0;i<size;i++){
35+
if(num[i]==0){
36+
count++;
37+
}
38+
}
39+
printf("%d",count);
40+
}
41+

1017 소수 쌍/.DS_Store

6 KB
Binary file not shown.

0 commit comments

Comments
 (0)