結果
問題 | No.780 オフ会 |
ユーザー |
![]() |
提出日時 | 2019-01-11 22:14:45 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 473 bytes |
コンパイル時間 | 792 ms |
コンパイル使用メモリ | 126,956 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-13 02:38:54 |
合計ジャッジ時間 | 1,706 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
ソースコード
import std.stdio, std.conv, std.string, std.bigint;import std.math, std.random, std.datetime;import std.array, std.range, std.algorithm, std.container, std.format;string read(){ static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res; }void main(){int a = read.to!int;int b = read.to!int;auto ans = "NO";if(a < b) ans = "YES";ans.writeln;if(a >= b) (a + 1 - b).writeln;else (b - a - 1).writeln;}