fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. // Constants
  5. #define LNT_CANCER_RISK_PER_SV 0.05 // 5% increase per Sievert
  6.  
  7. // Function to calculate LNT risk
  8. double lnt_risk(double dose_rate_mSv_per_day, int days) {
  9. double total_dose_Sv = (dose_rate_mSv_per_day * days) / 1000.0; // Convert mSv to Sv
  10. return total_dose_Sv * LNT_CANCER_RISK_PER_SV;
  11. }
  12.  
  13. // Function to calculate SNT risk (simple threshold model)
  14. double snt_risk(double dose_rate_mSv_per_day, int days, double threshold_mSv) {
  15. double total_dose_mSv = dose_rate_mSv_per_day * days;
  16. if (total_dose_mSv < threshold_mSv)
  17. return 0; // No risk below threshold
  18. return lnt_risk(dose_rate_mSv_per_day, days) * 0.5; // Assuming reduced risk above threshold
  19. }
  20.  
  21. int main() {
  22. // Define dose rates for isotopes (mSv/day)
  23. struct Isotope {
  24. char name[20];
  25. double dose_rate;
  26. };
  27.  
  28. struct Isotope isotopes[] = {
  29. {"Iodine-131", 2.0},
  30. {"Cesium-134", 1.5},
  31. {"Cesium-137", 1.0},
  32. {"Strontium-90", 0.8}
  33. };
  34.  
  35. int days, i;
  36.  
  37. // Print header
  38. printf("Time (days) | Isotope | LNT Risk | SNT Risk\n");
  39. printf("--------------------------------------------------\n");
  40.  
  41. // Loop over days
  42. for (days = 5; days <= 365; days += 5) {
  43. for (i = 0; i < 4; i++) {
  44. double lnt = lnt_risk(isotopes[i].dose_rate, days);
  45. double snt = snt_risk(isotopes[i].dose_rate, days, 50); // Threshold = 50 mSv
  46.  
  47. printf("%3d days | %-12s | %.6f | %.6f\n", days, isotopes[i].name, lnt, snt);
  48. }
  49. }
  50.  
  51. return 0;
  52. }
  53.  
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
Time (days) | Isotope       | LNT Risk | SNT Risk
--------------------------------------------------
  5 days   | Iodine-131   | 0.000500 | 0.000000
  5 days   | Cesium-134   | 0.000375 | 0.000000
  5 days   | Cesium-137   | 0.000250 | 0.000000
  5 days   | Strontium-90 | 0.000200 | 0.000000
 10 days   | Iodine-131   | 0.001000 | 0.000000
 10 days   | Cesium-134   | 0.000750 | 0.000000
 10 days   | Cesium-137   | 0.000500 | 0.000000
 10 days   | Strontium-90 | 0.000400 | 0.000000
 15 days   | Iodine-131   | 0.001500 | 0.000000
 15 days   | Cesium-134   | 0.001125 | 0.000000
 15 days   | Cesium-137   | 0.000750 | 0.000000
 15 days   | Strontium-90 | 0.000600 | 0.000000
 20 days   | Iodine-131   | 0.002000 | 0.000000
 20 days   | Cesium-134   | 0.001500 | 0.000000
 20 days   | Cesium-137   | 0.001000 | 0.000000
 20 days   | Strontium-90 | 0.000800 | 0.000000
 25 days   | Iodine-131   | 0.002500 | 0.001250
 25 days   | Cesium-134   | 0.001875 | 0.000000
 25 days   | Cesium-137   | 0.001250 | 0.000000
 25 days   | Strontium-90 | 0.001000 | 0.000000
 30 days   | Iodine-131   | 0.003000 | 0.001500
 30 days   | Cesium-134   | 0.002250 | 0.000000
 30 days   | Cesium-137   | 0.001500 | 0.000000
 30 days   | Strontium-90 | 0.001200 | 0.000000
 35 days   | Iodine-131   | 0.003500 | 0.001750
 35 days   | Cesium-134   | 0.002625 | 0.001313
 35 days   | Cesium-137   | 0.001750 | 0.000000
 35 days   | Strontium-90 | 0.001400 | 0.000000
 40 days   | Iodine-131   | 0.004000 | 0.002000
 40 days   | Cesium-134   | 0.003000 | 0.001500
 40 days   | Cesium-137   | 0.002000 | 0.000000
 40 days   | Strontium-90 | 0.001600 | 0.000000
 45 days   | Iodine-131   | 0.004500 | 0.002250
 45 days   | Cesium-134   | 0.003375 | 0.001688
 45 days   | Cesium-137   | 0.002250 | 0.000000
 45 days   | Strontium-90 | 0.001800 | 0.000000
 50 days   | Iodine-131   | 0.005000 | 0.002500
 50 days   | Cesium-134   | 0.003750 | 0.001875
 50 days   | Cesium-137   | 0.002500 | 0.001250
 50 days   | Strontium-90 | 0.002000 | 0.000000
 55 days   | Iodine-131   | 0.005500 | 0.002750
 55 days   | Cesium-134   | 0.004125 | 0.002063
 55 days   | Cesium-137   | 0.002750 | 0.001375
 55 days   | Strontium-90 | 0.002200 | 0.000000
 60 days   | Iodine-131   | 0.006000 | 0.003000
 60 days   | Cesium-134   | 0.004500 | 0.002250
 60 days   | Cesium-137   | 0.003000 | 0.001500
 60 days   | Strontium-90 | 0.002400 | 0.000000
 65 days   | Iodine-131   | 0.006500 | 0.003250
 65 days   | Cesium-134   | 0.004875 | 0.002438
 65 days   | Cesium-137   | 0.003250 | 0.001625
 65 days   | Strontium-90 | 0.002600 | 0.001300
 70 days   | Iodine-131   | 0.007000 | 0.003500
 70 days   | Cesium-134   | 0.005250 | 0.002625
 70 days   | Cesium-137   | 0.003500 | 0.001750
 70 days   | Strontium-90 | 0.002800 | 0.001400
 75 days   | Iodine-131   | 0.007500 | 0.003750
 75 days   | Cesium-134   | 0.005625 | 0.002813
 75 days   | Cesium-137   | 0.003750 | 0.001875
 75 days   | Strontium-90 | 0.003000 | 0.001500
 80 days   | Iodine-131   | 0.008000 | 0.004000
 80 days   | Cesium-134   | 0.006000 | 0.003000
 80 days   | Cesium-137   | 0.004000 | 0.002000
 80 days   | Strontium-90 | 0.003200 | 0.001600
 85 days   | Iodine-131   | 0.008500 | 0.004250
 85 days   | Cesium-134   | 0.006375 | 0.003188
 85 days   | Cesium-137   | 0.004250 | 0.002125
 85 days   | Strontium-90 | 0.003400 | 0.001700
 90 days   | Iodine-131   | 0.009000 | 0.004500
 90 days   | Cesium-134   | 0.006750 | 0.003375
 90 days   | Cesium-137   | 0.004500 | 0.002250
 90 days   | Strontium-90 | 0.003600 | 0.001800
 95 days   | Iodine-131   | 0.009500 | 0.004750
 95 days   | Cesium-134   | 0.007125 | 0.003562
 95 days   | Cesium-137   | 0.004750 | 0.002375
 95 days   | Strontium-90 | 0.003800 | 0.001900
100 days   | Iodine-131   | 0.010000 | 0.005000
100 days   | Cesium-134   | 0.007500 | 0.003750
100 days   | Cesium-137   | 0.005000 | 0.002500
100 days   | Strontium-90 | 0.004000 | 0.002000
105 days   | Iodine-131   | 0.010500 | 0.005250
105 days   | Cesium-134   | 0.007875 | 0.003938
105 days   | Cesium-137   | 0.005250 | 0.002625
105 days   | Strontium-90 | 0.004200 | 0.002100
110 days   | Iodine-131   | 0.011000 | 0.005500
110 days   | Cesium-134   | 0.008250 | 0.004125
110 days   | Cesium-137   | 0.005500 | 0.002750
110 days   | Strontium-90 | 0.004400 | 0.002200
115 days   | Iodine-131   | 0.011500 | 0.005750
115 days   | Cesium-134   | 0.008625 | 0.004312
115 days   | Cesium-137   | 0.005750 | 0.002875
115 days   | Strontium-90 | 0.004600 | 0.002300
120 days   | Iodine-131   | 0.012000 | 0.006000
120 days   | Cesium-134   | 0.009000 | 0.004500
120 days   | Cesium-137   | 0.006000 | 0.003000
120 days   | Strontium-90 | 0.004800 | 0.002400
125 days   | Iodine-131   | 0.012500 | 0.006250
125 days   | Cesium-134   | 0.009375 | 0.004688
125 days   | Cesium-137   | 0.006250 | 0.003125
125 days   | Strontium-90 | 0.005000 | 0.002500
130 days   | Iodine-131   | 0.013000 | 0.006500
130 days   | Cesium-134   | 0.009750 | 0.004875
130 days   | Cesium-137   | 0.006500 | 0.003250
130 days   | Strontium-90 | 0.005200 | 0.002600
135 days   | Iodine-131   | 0.013500 | 0.006750
135 days   | Cesium-134   | 0.010125 | 0.005063
135 days   | Cesium-137   | 0.006750 | 0.003375
135 days   | Strontium-90 | 0.005400 | 0.002700
140 days   | Iodine-131   | 0.014000 | 0.007000
140 days   | Cesium-134   | 0.010500 | 0.005250
140 days   | Cesium-137   | 0.007000 | 0.003500
140 days   | Strontium-90 | 0.005600 | 0.002800
145 days   | Iodine-131   | 0.014500 | 0.007250
145 days   | Cesium-134   | 0.010875 | 0.005438
145 days   | Cesium-137   | 0.007250 | 0.003625
145 days   | Strontium-90 | 0.005800 | 0.002900
150 days   | Iodine-131   | 0.015000 | 0.007500
150 days   | Cesium-134   | 0.011250 | 0.005625
150 days   | Cesium-137   | 0.007500 | 0.003750
150 days   | Strontium-90 | 0.006000 | 0.003000
155 days   | Iodine-131   | 0.015500 | 0.007750
155 days   | Cesium-134   | 0.011625 | 0.005813
155 days   | Cesium-137   | 0.007750 | 0.003875
155 days   | Strontium-90 | 0.006200 | 0.003100
160 days   | Iodine-131   | 0.016000 | 0.008000
160 days   | Cesium-134   | 0.012000 | 0.006000
160 days   | Cesium-137   | 0.008000 | 0.004000
160 days   | Strontium-90 | 0.006400 | 0.003200
165 days   | Iodine-131   | 0.016500 | 0.008250
165 days   | Cesium-134   | 0.012375 | 0.006188
165 days   | Cesium-137   | 0.008250 | 0.004125
165 days   | Strontium-90 | 0.006600 | 0.003300
170 days   | Iodine-131   | 0.017000 | 0.008500
170 days   | Cesium-134   | 0.012750 | 0.006375
170 days   | Cesium-137   | 0.008500 | 0.004250
170 days   | Strontium-90 | 0.006800 | 0.003400
175 days   | Iodine-131   | 0.017500 | 0.008750
175 days   | Cesium-134   | 0.013125 | 0.006563
175 days   | Cesium-137   | 0.008750 | 0.004375
175 days   | Strontium-90 | 0.007000 | 0.003500
180 days   | Iodine-131   | 0.018000 | 0.009000
180 days   | Cesium-134   | 0.013500 | 0.006750
180 days   | Cesium-137   | 0.009000 | 0.004500
180 days   | Strontium-90 | 0.007200 | 0.003600
185 days   | Iodine-131   | 0.018500 | 0.009250
185 days   | Cesium-134   | 0.013875 | 0.006938
185 days   | Cesium-137   | 0.009250 | 0.004625
185 days   | Strontium-90 | 0.007400 | 0.003700
190 days   | Iodine-131   | 0.019000 | 0.009500
190 days   | Cesium-134   | 0.014250 | 0.007125
190 days   | Cesium-137   | 0.009500 | 0.004750
190 days   | Strontium-90 | 0.007600 | 0.003800
195 days   | Iodine-131   | 0.019500 | 0.009750
195 days   | Cesium-134   | 0.014625 | 0.007312
195 days   | Cesium-137   | 0.009750 | 0.004875
195 days   | Strontium-90 | 0.007800 | 0.003900
200 days   | Iodine-131   | 0.020000 | 0.010000
200 days   | Cesium-134   | 0.015000 | 0.007500
200 days   | Cesium-137   | 0.010000 | 0.005000
200 days   | Strontium-90 | 0.008000 | 0.004000
205 days   | Iodine-131   | 0.020500 | 0.010250
205 days   | Cesium-134   | 0.015375 | 0.007687
205 days   | Cesium-137   | 0.010250 | 0.005125
205 days   | Strontium-90 | 0.008200 | 0.004100
210 days   | Iodine-131   | 0.021000 | 0.010500
210 days   | Cesium-134   | 0.015750 | 0.007875
210 days   | Cesium-137   | 0.010500 | 0.005250
210 days   | Strontium-90 | 0.008400 | 0.004200
215 days   | Iodine-131   | 0.021500 | 0.010750
215 days   | Cesium-134   | 0.016125 | 0.008063
215 days   | Cesium-137   | 0.010750 | 0.005375
215 days   | Strontium-90 | 0.008600 | 0.004300
220 days   | Iodine-131   | 0.022000 | 0.011000
220 days   | Cesium-134   | 0.016500 | 0.008250
220 days   | Cesium-137   | 0.011000 | 0.005500
220 days   | Strontium-90 | 0.008800 | 0.004400
225 days   | Iodine-131   | 0.022500 | 0.011250
225 days   | Cesium-134   | 0.016875 | 0.008438
225 days   | Cesium-137   | 0.011250 | 0.005625
225 days   | Strontium-90 | 0.009000 | 0.004500
230 days   | Iodine-131   | 0.023000 | 0.011500
230 days   | Cesium-134   | 0.017250 | 0.008625
230 days   | Cesium-137   | 0.011500 | 0.005750
230 days   | Strontium-90 | 0.009200 | 0.004600
235 days   | Iodine-131   | 0.023500 | 0.011750
235 days   | Cesium-134   | 0.017625 | 0.008812
235 days   | Cesium-137   | 0.011750 | 0.005875
235 days   | Strontium-90 | 0.009400 | 0.004700
240 days   | Iodine-131   | 0.024000 | 0.012000
240 days   | Cesium-134   | 0.018000 | 0.009000
240 days   | Cesium-137   | 0.012000 | 0.006000
240 days   | Strontium-90 | 0.009600 | 0.004800
245 days   | Iodine-131   | 0.024500 | 0.012250
245 days   | Cesium-134   | 0.018375 | 0.009187
245 days   | Cesium-137   | 0.012250 | 0.006125
245 days   | Strontium-90 | 0.009800 | 0.004900
250 days   | Iodine-131   | 0.025000 | 0.012500
250 days   | Cesium-134   | 0.018750 | 0.009375
250 days   | Cesium-137   | 0.012500 | 0.006250
250 days   | Strontium-90 | 0.010000 | 0.005000
255 days   | Iodine-131   | 0.025500 | 0.012750
255 days   | Cesium-134   | 0.019125 | 0.009563
255 days   | Cesium-137   | 0.012750 | 0.006375
255 days   | Strontium-90 | 0.010200 | 0.005100
260 days   | Iodine-131   | 0.026000 | 0.013000
260 days   | Cesium-134   | 0.019500 | 0.009750
260 days   | Cesium-137   | 0.013000 | 0.006500
260 days   | Strontium-90 | 0.010400 | 0.005200
265 days   | Iodine-131   | 0.026500 | 0.013250
265 days   | Cesium-134   | 0.019875 | 0.009938
265 days   | Cesium-137   | 0.013250 | 0.006625
265 days   | Strontium-90 | 0.010600 | 0.005300
270 days   | Iodine-131   | 0.027000 | 0.013500
270 days   | Cesium-134   | 0.020250 | 0.010125
270 days   | Cesium-137   | 0.013500 | 0.006750
270 days   | Strontium-90 | 0.010800 | 0.005400
275 days   | Iodine-131   | 0.027500 | 0.013750
275 days   | Cesium-134   | 0.020625 | 0.010313
275 days   | Cesium-137   | 0.013750 | 0.006875
275 days   | Strontium-90 | 0.011000 | 0.005500
280 days   | Iodine-131   | 0.028000 | 0.014000
280 days   | Cesium-134   | 0.021000 | 0.010500
280 days   | Cesium-137   | 0.014000 | 0.007000
280 days   | Strontium-90 | 0.011200 | 0.005600
285 days   | Iodine-131   | 0.028500 | 0.014250
285 days   | Cesium-134   | 0.021375 | 0.010688
285 days   | Cesium-137   | 0.014250 | 0.007125
285 days   | Strontium-90 | 0.011400 | 0.005700
290 days   | Iodine-131   | 0.029000 | 0.014500
290 days   | Cesium-134   | 0.021750 | 0.010875
290 days   | Cesium-137   | 0.014500 | 0.007250
290 days   | Strontium-90 | 0.011600 | 0.005800
295 days   | Iodine-131   | 0.029500 | 0.014750
295 days   | Cesium-134   | 0.022125 | 0.011063
295 days   | Cesium-137   | 0.014750 | 0.007375
295 days   | Strontium-90 | 0.011800 | 0.005900
300 days   | Iodine-131   | 0.030000 | 0.015000
300 days   | Cesium-134   | 0.022500 | 0.011250
300 days   | Cesium-137   | 0.015000 | 0.007500
300 days   | Strontium-90 | 0.012000 | 0.006000
305 days   | Iodine-131   | 0.030500 | 0.015250
305 days   | Cesium-134   | 0.022875 | 0.011438
305 days   | Cesium-137   | 0.015250 | 0.007625
305 days   | Strontium-90 | 0.012200 | 0.006100
310 days   | Iodine-131   | 0.031000 | 0.015500
310 days   | Cesium-134   | 0.023250 | 0.011625
310 days   | Cesium-137   | 0.015500 | 0.007750
310 days   | Strontium-90 | 0.012400 | 0.006200
315 days   | Iodine-131   | 0.031500 | 0.015750
315 days   | Cesium-134   | 0.023625 | 0.011813
315 days   | Cesium-137   | 0.015750 | 0.007875
315 days   | Strontium-90 | 0.012600 | 0.006300
320 days   | Iodine-131   | 0.032000 | 0.016000
320 days   | Cesium-134   | 0.024000 | 0.012000
320 days   | Cesium-137   | 0.016000 | 0.008000
320 days   | Strontium-90 | 0.012800 | 0.006400
325 days   | Iodine-131   | 0.032500 | 0.016250
325 days   | Cesium-134   | 0.024375 | 0.012188
325 days   | Cesium-137   | 0.016250 | 0.008125
325 days   | Strontium-90 | 0.013000 | 0.006500
330 days   | Iodine-131   | 0.033000 | 0.016500
330 days   | Cesium-134   | 0.024750 | 0.012375
330 days   | Cesium-137   | 0.016500 | 0.008250
330 days   | Strontium-90 | 0.013200 | 0.006600
335 days   | Iodine-131   | 0.033500 | 0.016750
335 days   | Cesium-134   | 0.025125 | 0.012562
335 days   | Cesium-137   | 0.016750 | 0.008375
335 days   | Strontium-90 | 0.013400 | 0.006700
340 days   | Iodine-131   | 0.034000 | 0.017000
340 days   | Cesium-134   | 0.025500 | 0.012750
340 days   | Cesium-137   | 0.017000 | 0.008500
340 days   | Strontium-90 | 0.013600 | 0.006800
345 days   | Iodine-131   | 0.034500 | 0.017250
345 days   | Cesium-134   | 0.025875 | 0.012937
345 days   | Cesium-137   | 0.017250 | 0.008625
345 days   | Strontium-90 | 0.013800 | 0.006900
350 days   | Iodine-131   | 0.035000 | 0.017500
350 days   | Cesium-134   | 0.026250 | 0.013125
350 days   | Cesium-137   | 0.017500 | 0.008750
350 days   | Strontium-90 | 0.014000 | 0.007000
355 days   | Iodine-131   | 0.035500 | 0.017750
355 days   | Cesium-134   | 0.026625 | 0.013312
355 days   | Cesium-137   | 0.017750 | 0.008875
355 days   | Strontium-90 | 0.014200 | 0.007100
360 days   | Iodine-131   | 0.036000 | 0.018000
360 days   | Cesium-134   | 0.027000 | 0.013500
360 days   | Cesium-137   | 0.018000 | 0.009000
360 days   | Strontium-90 | 0.014400 | 0.007200
365 days   | Iodine-131   | 0.036500 | 0.018250
365 days   | Cesium-134   | 0.027375 | 0.013688
365 days   | Cesium-137   | 0.018250 | 0.009125
365 days   | Strontium-90 | 0.014600 | 0.007300