#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main() {
// 現在の時間をシードとして乱数を初期化
// サイコロ3つの結果を保持する配列
int dice[3];
// サイコロの結果を生成
for (int i = 0; i < 3; i++) {
dice
[i
] = (rand() % 6) + 1; // 1から6の範囲の数値を生成 }
// 結果を表示
printf("結果: %d, %d, %d", dice
[0], dice
[1], dice
[2]);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHRpbWUuaD4KCmludCBtYWluKCkgewogICAgLy8g54++5Zyo44Gu5pmC6ZaT44KS44K344O844OJ44Go44GX44Gm5Lmx5pWw44KS5Yid5pyf5YyWCiAgICBzcmFuZCh0aW1lKE5VTEwpKTsKICAgIAogICAgLy8g44K144Kk44Kz44OtM+OBpOOBrue1kOaenOOCkuS/neaMgeOBmeOCi+mFjeWIlwogICAgaW50IGRpY2VbM107CiAgICAKICAgIC8vIOOCteOCpOOCs+ODreOBrue1kOaenOOCkueUn+aIkAogICAgZm9yIChpbnQgaSA9IDA7IGkgPCAzOyBpKyspIHsKICAgICAgICBkaWNlW2ldID0gKHJhbmQoKSAlIDYpICsgMTsgLy8gMeOBi+OCiTbjga7nr4Tlm7Ljga7mlbDlgKTjgpLnlJ/miJAKICAgIH0KICAgIAogICAgLy8g57WQ5p6c44KS6KGo56S6CiAgICBwcmludGYoIue1kOaenDogJWQsICVkLCAlZCIsIGRpY2VbMF0sIGRpY2VbMV0sIGRpY2VbMl0pOwogICAgCiAgICByZXR1cm4gMDsKfQ==