diff --git a/Stone/Solution_Stones_C b/Stone/Solution_Stones_C new file mode 100644 index 0000000..8b74e52 --- /dev/null +++ b/Stone/Solution_Stones_C @@ -0,0 +1,19 @@ +#include + +int main() +{ + int a,b,c,ans,t; + scanf("%d", &t); + while(t--){ + ans=0; + scanf("%d %d %d", &a, &b, &c); + while(b>=1 && c>=2){ + b-=1; c-=2; ans+=3; + } + while(a>=1 && b>=2){ + a-=1; b-=2; ans+=3; + } + printf("%d\n", ans); + } + return 0; +}