結果

問題 No.374 コイン
ユーザー Lay_ec
提出日時 2016-06-04 22:54:52
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 613 bytes
コンパイル時間 720 ms
コンパイル使用メモリ 79,316 KB
実行使用メモリ 10,496 KB
最終ジャッジ日時 2024-11-07 22:39:04
合計ジャッジ時間 3,684 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 26 TLE * 1 -- * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <set>
#include <sstream>
#include <map>
#include <queue>
#include <stack>

using namespace std;

const long long mod=1000000007; 

double PI =3.141592653589793;

bool calc(long long B,int n){
	
	int R=B/sin( PI/n );
	return R<B;
}

int main()
{

	long long A,B;
	cin>>A>>B;
	
	if(A<B){
		cout<<"K"<<endl;
	}else if( A < 2*B ){
		cout<<"S"<<endl;
	}else{
		int n=3;
		while(calc(B,n+1)) n++;
		cout<<"KS"[n%2]<<endl;
	}
	
	return 0;
}
0