2005 年度「情報処理演習A」 2005-06-06 別紙データ

授業期間が終わるまでは、このデータはネット上では非公開でした。 (もしも公開していたら、 コピー&ペーストであっと言う間に課題が終わってしまったでしょう。)

開始 終了     甲       乙       丙       開始 終了     甲       乙       丙

 01:        108.63   200.86   248.99      47:  16:   346.75   451.60   589.23
 02:        128.07   207.31   269.83      48:  17:   368.38   476.93   587.68
 03:        121.23   205.46   264.07      49:  18:   355.89   469.37   578.30
 04:        126.58   193.70   270.07      50:  19:   372.76   491.22   583.13
 05:        125.28   226.17   277.88      51:  20:   357.74   481.30   619.75
 06:        154.75   210.90   291.60      52:  21:   370.12   486.91   617.98
 07:        164.07   225.36   286.72      53:  22:   376.82   504.04   616.06
 08:        155.25   218.50   303.49      54:  23:   380.49   502.38   617.52
 09:        175.10   223.12   295.30      55:  24:   379.49   516.80   634.37
 10:        158.20   250.11   303.41      56:  25:   400.09   512.48   626.25
 11:        166.21   249.77   329.09      57:  26:   397.87   528.04   655.27
 12:        167.01   251.38   339.90      58:  27:   393.27   536.85   642.00
 13:        181.62   248.06   332.60      59:  28:   425.49   528.43   650.61
 14:        173.07   262.20   347.79      60:  29:   430.33   558.14   652.60
 15:        176.07   263.56   367.79           30:   429.44   537.17   662.43
 16:        204.03   264.69   343.59           31:   429.49   552.77   681.60
 17:        198.02   275.37   360.70           32:   442.18   554.06   703.69
 18:        204.63   299.71   380.79           33:   426.37   562.83   708.07
 19:        222.22   284.99   383.01           34:   450.23   566.95   704.28
 20:        223.80   319.51   384.95           35:   430.73   572.58   698.98
 21:        234.78   320.70   410.04           36:   436.60   599.85   723.78
 22:        228.74   308.83   390.64           37:   470.10   583.23   708.24
 23:        232.84   314.52   395.80           38:   455.39   592.81   716.66
 24:        222.45   339.02   424.43           39:   474.94   604.01   723.59
 25:        225.23   332.35   432.27           40:   458.66   609.77   736.49
 26:        238.01   331.24   426.92           41:   471.64   617.56   740.78
 27:        236.79   332.93   444.39           42:   474.49   636.82   764.92
 28:        263.52   358.99   427.50           43:   491.12   619.96   772.56
 29:        248.33   359.91   457.99           44:   500.31   627.88   768.68
 30:        261.62   380.63   443.16           45:   487.17   640.35   791.56
 31:        269.70   358.06   455.47           46:   515.08   639.59   776.86
 32:  01:   265.77   367.63   475.71           47:   516.97   667.73   793.86
 33:  02:   293.35   378.45   473.68           48:   521.74   670.92   809.16
 34:  03:   302.32   376.13   494.32           49:   513.15   648.28   806.80
 35:  04:   276.85   389.05   507.10           50:   535.43   655.42   810.13
 36:  05:   304.72   403.42   489.81           51:   525.51   670.61   812.91
 37:  06:   308.56   408.42   506.61           52:   535.75   697.47   829.10
 38:  07:   314.64   399.69   503.96           53:   544.35   697.88   838.31
 39:  08:   321.23   411.22   521.69           54:   533.40   700.07   835.24
 40:  09:   331.23   416.28   540.86           55:   534.66   713.12   857.66
 41:  10:   309.68   440.54   537.48           56:   567.22   715.40   851.14
 42:  11:   331.70   447.01   535.88           57:   552.82   702.47   871.60
 43:  12:   339.90   454.37   541.05           58:   560.02   710.75   866.63
 44:  13:   323.87   462.53   546.11           59:   582.73   717.53   876.17
 45:  14:   340.50   445.54   565.69           60:   582.82   725.81   875.43
 46:  15:   340.39   463.68   555.50     

次が、上のデータを作るのに使ったプログラムです。これも当時は秘密でした。

#include <stdio.h>
#include <stdlib.h>

#define N 60        /* 学生数 */
#define M 32        /* 一人あたりのデータ数 */
#define SEED 8      /* 乱数の種(いちおう秘密) */

void out(int i);

double a[N+M];
double b[N+M];
double c[N+M];

main() {
    int i;

    srand(SEED);
    for (i = 1; i < N+M; i++) {
        a[i] = ((i+20) * 500 + rand()%65536/10) / 100.0;
        b[i] = ((i+28) * 600 + rand()%65536/10) / 100.0;
        c[i] = ((i+33) * 700 + rand()%65536/10) / 100.0;
    }

    printf("開始 終了     甲       乙       丙       開始 終了     甲       乙       丙\n\n");
    for (i = 1; i <= (N+M)/2; i++) {
        out(i);
        printf("     ");
        if (i+(N+M)/2 < N+M) {
            out(i+(N+M)/2);
        }
        putchar('\n');
    }
}


void out(int i) {
    char s[128+1];

    if (1 <= i && i <= N) {
        sprintf(s, "%02d", i);
        printf(" %02s: ", s);
    } else {
        printf("     ");
    }
    if (M <= i) {
        sprintf(s, "%02d", i-M+1);
        printf(" %02s:   ", s);
    } else {
        printf("       ");
    }
    printf("%.2f   %.2f   %.2f", a[i], b[i], c[i]);
}

岩瀬順一