結果
問題 | No.799 赤黒かーどげぇむ |
ユーザー |
![]() |
提出日時 | 2019-03-17 21:25:51 |
言語 | D (dmd 2.099.1) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 864 bytes |
コンパイル時間 | 2,364 ms |
使用メモリ | 5,160 KB |
最終ジャッジ日時 | 2023-02-11 03:49:30 |
合計ジャッジ時間 | 3,478 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
テストケース
テストケース表示入力 | 結果 | 実行時間 使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,900 KB |
testcase_01 | AC | 1 ms
4,900 KB |
testcase_02 | AC | 1 ms
4,900 KB |
testcase_03 | AC | 1 ms
4,900 KB |
testcase_04 | AC | 2 ms
4,904 KB |
testcase_05 | AC | 1 ms
5,156 KB |
testcase_06 | AC | 2 ms
4,904 KB |
testcase_07 | AC | 2 ms
5,160 KB |
testcase_08 | AC | 1 ms
4,904 KB |
testcase_09 | AC | 1 ms
5,156 KB |
testcase_10 | AC | 2 ms
4,904 KB |
testcase_11 | AC | 2 ms
4,904 KB |
testcase_12 | AC | 1 ms
4,904 KB |
testcase_13 | AC | 1 ms
4,904 KB |
testcase_14 | AC | 1 ms
4,900 KB |
testcase_15 | AC | 1 ms
4,900 KB |
testcase_16 | AC | 1 ms
5,156 KB |
testcase_17 | AC | 1 ms
5,156 KB |
testcase_18 | AC | 1 ms
5,160 KB |
testcase_19 | AC | 1 ms
4,900 KB |
ソースコード
import std.stdio, std.conv, std.string; import std.array, std.range, std.algorithm, std.container; import std.math, std.random, std.bigint, std.datetime, std.format; string read(){ static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res; } int DEBUG_LEVEL = 0; void print()(){ writeln(""); } void print(T, A ...)(T t, lazy A a){ write(t), print(a); } void print(int level, T, A ...)(T t, lazy A a){ if(level <= DEBUG_LEVEL) print(t, a); } void main(string[] args){ if(args.length > 1 && args[1] == "-debug"){ if(args.length > 2 && args[2].isNumeric) DEBUG_LEVEL = args[2].to!int; else DEBUG_LEVEL = 1; } long a = read.to!long; long b = read.to!long; long c = read.to!long; long d = read.to!long; long ans = 0; foreach(i; a .. b + 1) foreach(j; c .. d + 1) if(i != j) ans += 1; ans.writeln; }