結果

問題 No.374 コイン
ユーザー uafr_cs
提出日時 2017-11-06 20:53:58
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 781 bytes
コンパイル時間 1,977 ms
コンパイル使用メモリ 75,280 KB
実行使用メモリ 54,452 KB
最終ジャッジ日時 2024-11-24 04:05:36
合計ジャッジ時間 6,635 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14 WA * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.TreeSet;

public class Main {
	
	// 円の中に円を詰める
	// https://en.wikipedia.org/wiki/Circle_packing_in_a_circle
	
	// 2個  -> A : B = 2 : 1
	// 3個  -> A : B = 2.154 : 1 => 3 : 1
	// 4個  -> A : B = 2.414 : 1 => 3 : 1
	// 6個  -> A : B = 3 : 1
	// 7個  -> A : B = 3 : 1
	// 8個  -> A : B = 4 : 1
	// 12個 -> A : B = 5 : 1
	// 20個 -> A : B = 6 : 1
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		final long A = sc.nextLong();
		final long B = sc.nextLong();
		
		if(A < B){ System.out.println("K"); return; }
		
		final long times = A / B;
		System.out.println(times % 2 == 0 ? "S" : "K");
	}
}
0