結果

問題 No.1058 素敵な数
ユーザー kng_kng_
提出日時 2020-05-22 21:47:19
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 779 bytes
コンパイル時間 557 ms
コンパイル使用メモリ 62,968 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-15 16:31:11
合計ジャッジ時間 1,058 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main(){
  int n;
  cin >> n;
  int v[6] = {
    10007,
    10009,
    10037,
    10061,
    10067, 10069};
  switch (n - 1) {
    case (0):
      cout << 1;
      break;
    case (1):
      cout << v[0] * v[0];
      break;
    case (2):
      cout << v[0] * v[1];
      break;
    case (3):
      cout << v[1] * v[1];
      break;
    case (4):
      cout << v[0] * v[2];
      break;
    case (5):
      cout << v[1] * v[2];
      break;
    case (6):
      cout << v[0] * v[3];
      break;
    case (7):
      cout << v[1] * v[3];
      break;
    case (8):
      cout << v[4] * v[0];
      break;
    case (9):
      cout << v[2] * v[2];
      break;
    case (10):
      cout << v[0] * v[5];
      break;
  }
  cout << endl;
}
0