#include <stdio.h>
#include <math.h>

#define R 3000.0      // 抵抗値 3 kΩ
#define L 0.001       // インダクタンス 1 mH
#define V 5.0         // 入力電圧 5V
#define TIME_STEP 0.0001  // 時間の刻み幅
#define MAX_TIME 0.01     // 最大計算時間

double calculate_current(double t) {
    return (V / R) * (1 - exp(-R * t / L));
}

int main() {
    printf("時間(s)\t電流(A)\n");
    for (double t = 0; t <= MAX_TIME; t += TIME_STEP) {
        double current = calculate_current(t);
        printf("%.6f\t%.6f\n", t, current);
    }
    return 0;
}
