結果

問題 No.374 コイン
ユーザー itezpaceitezpace
提出日時 2016-06-04 22:48:02
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 231 bytes
コンパイル時間 696 ms
コンパイル使用メモリ 54,000 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-17 00:49:39
合計ジャッジ時間 3,618 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 AC 2 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 WA -
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 1 ms
5,376 KB
testcase_17 AC 2 ms
5,376 KB
testcase_18 AC 2 ms
5,376 KB
testcase_19 AC 1 ms
5,376 KB
testcase_20 RE -
testcase_21 RE -
testcase_22 WA -
testcase_23 AC 2 ms
5,376 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 RE -
testcase_27 AC 2 ms
5,376 KB
testcase_28 RE -
testcase_29 RE -
testcase_30 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int main(){
  int a,b; cin>>a>>b;
  int c=0;
  if(a>=b){
    a-=b;
    c++;
  }
  int x=a/(2*b);
  c+=x;
  if(c%2==1){
    cout<<"S"<<endl;
  } else {
    cout<<"K"<<endl;
  }
  return 0;
}
0