結果
問題 |
No.383 レーティング
|
ユーザー |
|
提出日時 | 2019-09-02 08:43:34 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 537 bytes |
コンパイル時間 | 1,769 ms |
コンパイル使用メモリ | 169,080 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-14 09:01:31 |
合計ジャッジ時間 | 2,318 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
/** @file 383.cpp @title No.383 レーティング - yukicoder @url https://yukicoder.me/problems/no/383 **/ #include <bits/stdc++.h> using namespace std; typedef long long LL; #define ALL(obj) (obj).begin(), (obj).end() #define REP(i, N) for (int i = 0; i < (N); ++i) int main() { int a, b; cin >> a >> b; string ans = ""; if (a == b) { ans = "0"; } else if (a < b) { ans += "+"; ans += to_string(b - a); } else { ans += "-"; ans += to_string(a - b); } cout << ans << endl; return 0; }