class Kadai{
public static void main
(String[] mes
){ int[] a = {5,-1,3,4,-2,7};
int count =0;
for (int i=0;i<a.length; i++)
if (a[i]>0)
count++;
int[] b =new int[count];
int j =0;
for (int i=0; i<a.length;i++)
if(a[i]>0)
b[j++]=a[i];
/*ここから下は確認用なので提出する前に消すこと*/
for (int i=0; i<a.length;i++)
for (int i=0; i<b.length;i++)
}
}
Y2xhc3MgS2FkYWl7CiAgICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXSBtZXMpewogICAgICAgIGludFtdIGEgPSB7NSwtMSwzLDQsLTIsN307CiAgICAgICAgCiAgICAgICAgaW50IGNvdW50ID0wOwogICAgICAgIAogICAgICAgIGZvciAoaW50IGk9MDtpPGEubGVuZ3RoOyBpKyspIAogICAgICAgICAgICBpZiAoYVtpXT4wKQogICAgICAgICAgICAgICAgY291bnQrKzsKICAgICAgICAKICAgICAgICBpbnRbXSBiID1uZXcgaW50W2NvdW50XTsgCiAgICAgICAgCiAgICAgICAgaW50IGogPTA7IAogICAgICAgIGZvciAoaW50IGk9MDsgaTxhLmxlbmd0aDtpKyspIAogICAgICAgICAgICBpZihhW2ldPjApCiAgICAgICAgICAgICAgICBiW2orK109YVtpXTsgCiAgICAgICAgCiAgICAgICAgLyrjgZPjgZPjgYvjgonkuIvjga/norroqo3nlKjjgarjga7jgafmj5Dlh7rjgZnjgovliY3jgavmtojjgZnjgZPjgagqLwogICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiYeOBrumFjeWIlyIpOwogICAgICAgIGZvciAoaW50IGk9MDsgaTxhLmxlbmd0aDtpKyspCiAgICAgICAgICAgIFN5c3RlbS5vdXQucHJpbnQoU3RyaW5nLnZhbHVlT2YoYVtpXSkgKyAiICIpOwogICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbigiXG5i44Gu6YWN5YiXIik7CiAgICAgICAgZm9yIChpbnQgaT0wOyBpPGIubGVuZ3RoO2krKykKICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludChTdHJpbmcudmFsdWVPZihiW2ldKSArICIgIik7CiAgICB9Cn0=