結果
問題 |
No.1057 素敵な日
|
ユーザー |
|
提出日時 | 2024-11-25 00:58:36 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 269 bytes |
コンパイル時間 | 1,517 ms |
コンパイル使用メモリ | 157,708 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-25 00:58:38 |
合計ジャッジ時間 | 1,980 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
外部呼び出し有り |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 7 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:18:28: warning: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 18 | int main() { solve();system("pause"); } | ~~~~~~^~~~~~~~~
ソースコード
#include <bits/stdc++.h> using namespace std; typedef int64_t ll; void solve() { cin.tie(nullptr); ios::sync_with_stdio(false); ll a,b; cin>>a>>b; ll ans=min(a,b)*2-1; if(a!=b){ ans++; } cout<<ans<<endl; } int main() { solve();system("pause"); }