結果
問題 | No.63 ポッキーゲーム |
ユーザー |
![]() |
提出日時 | 2016-09-24 20:36:06 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 308 bytes |
コンパイル時間 | 405 ms |
コンパイル使用メモリ | 55,644 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-24 05:16:39 |
合計ジャッジ時間 | 1,084 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
#include <iostream>#include <cstdio>#include <algorithm>using namespace std;typedef long long ll;#define rep(i,n) for(int i=0;i<(n);i++)int main(void){int n, k; cin >> n >> k;k *= 2;int cnt;if(n % k == 0){cnt = n / k - 1;}else{cnt = n / k;}printf("%d\n", k * cnt / 2);return 0;}