結果

問題 No.374 コイン
ユーザー uafr_csuafr_cs
提出日時 2017-11-06 20:53:58
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 781 bytes
コンパイル時間 2,217 ms
コンパイル使用メモリ 71,972 KB
実行使用メモリ 58,524 KB
最終ジャッジ日時 2023-08-15 19:37:58
合計ジャッジ時間 6,972 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 103 ms
56,020 KB
testcase_01 AC 104 ms
55,892 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 110 ms
56,012 KB
testcase_08 AC 115 ms
55,668 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 105 ms
55,664 KB
testcase_12 AC 107 ms
55,692 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 108 ms
55,872 KB
testcase_18 AC 106 ms
55,512 KB
testcase_19 AC 105 ms
53,880 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 110 ms
55,424 KB
testcase_23 WA -
testcase_24 AC 106 ms
55,760 KB
testcase_25 AC 104 ms
56,248 KB
testcase_26 AC 105 ms
55,576 KB
testcase_27 AC 106 ms
55,432 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
権限があれば一括ダウンロードができます

ソースコード

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