結果
問題 |
No.212 素数サイコロと合成数サイコロ (2)
|
ユーザー |
![]() |
提出日時 | 2025-04-15 10:27:18 |
言語 | C# (.NET 8.0.404) |
結果 |
AC
|
実行時間 | 54 ms / 5,000 ms |
コード長 | 880 bytes |
コンパイル時間 | 8,720 ms |
コンパイル使用メモリ | 173,056 KB |
実行使用メモリ | 187,904 KB |
最終ジャッジ日時 | 2025-04-15 10:27:29 |
合計ジャッジ時間 | 9,344 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (109 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
class Program { static void Main(string[] args) { const int primeSum = 2 + 3 + 5 + 7 + 11 + 13; //41 const int synthesisSum = 4+6+8+9+10+12; //49 int[] n = Array.ConvertAll(Console.ReadLine().Split(' '), num => int.Parse(num.ToString())); decimal product = 1; for(int i = 0; i < n[0]; i++) { product *= primeSum; } for (int i = 0; i < n[1]; i++) { product *= synthesisSum; } if (n[0] + n[1] == 0) { product = 0; } else { for(int i = 0; i < (n[0] + n[1]); i++) { product /= 6; } } Console.WriteLine(product); } }