結果
| 問題 | No.1895 Mod 2 |
| コンテスト | |
| ユーザー |
kokatsu
|
| 提出日時 | 2022-04-09 20:32:11 |
| 言語 | D (dmd 2.112.0) |
| 結果 |
AC
|
| 実行時間 | 9 ms / 2,000 ms |
| + 357µs | |
| コード長 | 427 bytes |
| 記録 | |
| コンパイル時間 | 1,019 ms |
| コンパイル使用メモリ | 186,112 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-27 04:46:12 |
| 合計ジャッジ時間 | 2,387 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 11 |
コンパイルメッセージ
/home/linuxbrew/.linuxbrew/opt/dmd/include/dlang/dmd/core/checkedint.d(814): Warning: cannot inline function `core.checkedint.mulu!().mulu`
ulong mulu()(ulong x, uint y, ref bool overflow)
^
ソースコード
import std;
void main() {
int T;
readf("%d\n", T);
foreach (_; 0 .. T) {
long L, R;
readf("%d %d\n", L, R);
--L;
long num = R.to!real.sqrt.floor.to!long;
R /= 2;
num += R.to!real.sqrt.floor.to!long;
num -= L.to!real.sqrt.floor.to!long;
L /= 2;
num -= L.to!real.sqrt.floor.to!long;
long res = num % 2;
res.writeln;
}
}
kokatsu