結果

問題 No.123 カードシャッフル
ユーザー Rp7rfRp7rf
提出日時 2015-01-11 23:26:43
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 600 bytes
コンパイル時間 563 ms
コンパイル使用メモリ 70,436 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-03 23:37:38
合計ジャッジ時間 1,262 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
using namespace std;
 
const int MAX= 10000100;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define ll long long int
#define gcd(a,b) __gcd(a,b)

int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

int main(void){
  int N,M;
  cin>>N>>M;
  vector<int> A(M);
  for(int i = 0; i < M ; i ++)cin>>A[i];
  cout<<A[N%M]<<endl;
}
0