-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmaxoffer
More file actions
62 lines (45 loc) ยท 1.56 KB
/
maxoffer
File metadata and controls
62 lines (45 loc) ยท 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
๋ฌธ์
<๊ทธ๋ฆผ 1>๊ณผ ๊ฐ์ด 9ร9 ๊ฒฉ์ํ์ ์ฐ์ฌ์ง 81๊ฐ์ ์์ฐ์๊ฐ ์ฃผ์ด์ง ๋, ์ด๋ค ์ค ์ต๋๊ฐ์ ์ฐพ๊ณ ๊ทธ ์ต๋๊ฐ์ด ๋ช ํ ๋ช ์ด์ ์์นํ ์์ธ์ง ๊ตฌํ๋ ํ๋ก๊ทธ๋จ์ ์์ฑํ์์ค.
์๋ฅผ ๋ค์ด, ๋ค์๊ณผ ๊ฐ์ด 81๊ฐ์ ์๊ฐ ์ฃผ์ด์ง๋ฉด
alt text
์ด๋ค ์ค ์ต๋๊ฐ์ 90์ด๊ณ , ์ด ๊ฐ์ 5ํ 7์ด์ ์์นํ๋ค.
์
๋ ฅ
์ฒซ์งธ ์ค๋ถํฐ ์ํ ๋ฒ์งธ ์ค๊น์ง ํ ์ค์ ์ํ ๊ฐ์ฉ ์์ฐ์๊ฐ ์ฃผ์ด์ง๋ค. ์ฃผ์ด์ง๋ ์์ฐ์๋ 100๋ณด๋ค ์๋ค.
์ถ๋ ฅ
์ฒซ์งธ ์ค์ ์ต๋๊ฐ์ ์ถ๋ ฅํ๊ณ , ๋์งธ ์ค์ ์ต๋๊ฐ์ด ์์นํ ํ ๋ฒํธ์ ์ด ๋ฒํธ๋ฅผ ๋น์นธ์ ์ฌ์ด์ ๋๊ณ ์ฐจ๋ก๋ก ์ถ๋ ฅํ๋ค. ์ต๋๊ฐ์ด ๋ ๊ฐ ์ด์์ธ ๊ฒฝ์ฐ ๊ทธ ์ค ํ์ ๋ฒํธ๊ฐ ๊ฐ์ฅ ์์ ๊ณณ์ ์์น๋ฅผ ์ถ๋ ฅํ๋ค. ํ ๋ฒํธ๋ ๊ฐ์ ๊ณณ์ด ์ฌ๋ฌ๊ฐ์ผ ๊ฒฝ์ฐ์๋ ์ด ๋ฒํธ๊ฐ ๊ฐ์ฅ ์์ ๊ณณ์ ์์น๋ฅผ ์ถ๋ ฅํ๋ค.
์์ ์
๋ ฅ
3 23 85 34 17 74 25 52 65
10 7 39 42 88 52 14 72 63
87 42 18 78 53 45 18 84 53
34 28 64 85 12 16 75 36 55
21 77 45 35 28 75 90 76 1
25 87 65 15 28 11 37 28 74
65 27 75 41 7 89 78 64 39
47 47 70 45 23 65 3 41 44
87 13 82 38 31 12 29 29 80
์์ ์ถ๋ ฅ
90
5 7
#include <stdio.h>
int main() {
int number[9][9];
int max=0;
int max_raw=0;
int max_col=0;
for(int i=0;i<9;i++){
for(int j=0;j<9;j++){
scanf("%d ",&number[i][j]);
}
}
for(int i=0;i<9;i++){
for(int j=0;j<9;j++){
if(number[i][j]>max){
max=number[i][j];
max_raw=i+1;
max_col=j+1;
}
}
}
printf("%d\n%d %d",max,max_raw,max_col);
return 0;
}