結果

問題 No.1004 サイコロの実装 (2)
ユーザー 東前頭十一枚目
提出日時 2020-03-06 22:03:00
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 405 bytes
コンパイル時間 1,470 ms
コンパイル使用メモリ 165,768 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-14 07:03:26
合計ジャッジ時間 2,595 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 6 WA * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
	int64_t a, b, x, n; cin >> a >> b >> x >> n;
	n <<= 1ll;
	int64_t l = n / 4;
	if(n > 4 and (n % 4 > 1)) ++l;
	int64_t r = n / 4;
	if(n > 4 and (n % 4 > 2)) ++r;
	cout << l << " " << r << '\n';
	// int64_t ma = 0;
	// for(int i = 1; i < 100; ++i) {
	// 	x = a * x + b;
	// 	ma += x;
	// 	cout << x << " " << ma % 2 << '\n';	
	// }
	return 0;
}

0