Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/McNuggets-problem/AWK/mcnuggets-problem.awk
Normal file
19
Task/McNuggets-problem/AWK/mcnuggets-problem.awk
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# syntax: GAWK -f MCNUGGETS_PROBLEM.AWK
|
||||
# converted from Go
|
||||
BEGIN {
|
||||
limit = 100
|
||||
for (a=0; a<=limit; a+=6) {
|
||||
for (b=a; b<=limit; b+=9) {
|
||||
for (c=b; c<=limit; c+=20) {
|
||||
arr[c] = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
for (i=limit; i>=0; i--) {
|
||||
if (!arr[i]+0) {
|
||||
printf("%d\n",i)
|
||||
break
|
||||
}
|
||||
}
|
||||
exit(0)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue