結果
問題 | No.1491 銀将 |
ユーザー |
|
提出日時 | 2021-04-30 21:25:26 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 151 bytes |
コンパイル時間 | 473 ms |
コンパイル使用メモリ | 63,244 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-18 23:44:43 |
合計ジャッジ時間 | 1,025 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main() | ^~~~
ソースコード
#include<iostream> using namespace std; long K; main() { cin>>K; long H=K,L=2-K; long ans=(K+K-1)*(H-L+1)+(H-L+2); ans+=K+K+1; cout<<ans<<endl; }