結果

問題 No.1004 サイコロの実装 (2)
ユーザー 37zigen37zigen
提出日時 2020-03-06 18:41:46
言語 Java21
(openjdk 21)
結果
AC  
実行時間 152 ms / 2,000 ms
コード長 458 bytes
コンパイル時間 2,485 ms
コンパイル使用メモリ 81,104 KB
実行使用メモリ 41,888 KB
最終ジャッジ日時 2024-04-22 04:04:32
合計ジャッジ時間 10,018 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 149 ms
41,728 KB
testcase_01 AC 134 ms
40,384 KB
testcase_02 AC 147 ms
41,728 KB
testcase_03 AC 145 ms
41,356 KB
testcase_04 AC 148 ms
41,560 KB
testcase_05 AC 146 ms
41,652 KB
testcase_06 AC 147 ms
41,220 KB
testcase_07 AC 149 ms
41,500 KB
testcase_08 AC 134 ms
40,244 KB
testcase_09 AC 145 ms
41,432 KB
testcase_10 AC 147 ms
41,496 KB
testcase_11 AC 148 ms
41,600 KB
testcase_12 AC 147 ms
41,608 KB
testcase_13 AC 149 ms
41,792 KB
testcase_14 AC 152 ms
41,512 KB
testcase_15 AC 146 ms
41,416 KB
testcase_16 AC 133 ms
40,384 KB
testcase_17 AC 151 ms
41,888 KB
testcase_18 AC 149 ms
41,720 KB
testcase_19 AC 149 ms
41,588 KB
testcase_20 AC 149 ms
41,656 KB
testcase_21 AC 148 ms
41,600 KB
testcase_22 AC 136 ms
40,556 KB
testcase_23 AC 135 ms
40,308 KB
testcase_24 AC 150 ms
41,584 KB
testcase_25 AC 152 ms
41,404 KB
testcase_26 AC 150 ms
41,684 KB
testcase_27 AC 151 ms
41,800 KB
testcase_28 AC 149 ms
41,428 KB
testcase_29 AC 149 ms
41,476 KB
testcase_30 AC 150 ms
41,720 KB
testcase_31 AC 149 ms
41,624 KB
testcase_32 AC 149 ms
41,576 KB
testcase_33 AC 134 ms
40,360 KB
testcase_34 AC 148 ms
41,532 KB
testcase_35 AC 147 ms
41,088 KB
testcase_36 AC 150 ms
41,780 KB
testcase_37 AC 150 ms
41,572 KB
testcase_38 AC 149 ms
41,728 KB
testcase_39 AC 150 ms
41,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		new Main().run();
	}
	
	void run() {
		Scanner sc=new Scanner(System.in);
		long a=sc.nextLong()%6;
		long b=sc.nextLong()%6;
		long x0=sc.nextLong()%6;
		long N=sc.nextLong();
		long x1=(a*x0+b)%6+1;
		System.out.println(x1%2==0?(0+" "+N/2):(N/2+" "+0));
	}
	
	void tr(Object...objects) {System.out.println(Arrays.deepToString(objects));}
}
0