結果
| 問題 |
No.63 ポッキーゲーム
|
| コンテスト | |
| ユーザー |
jolly_gliscor
|
| 提出日時 | 2018-02-23 00:48:05 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 566 ms / 5,000 ms |
| コード長 | 315 bytes |
| コンパイル時間 | 303 ms |
| コンパイル使用メモリ | 37,504 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-04 12:09:52 |
| 合計ジャッジ時間 | 3,037 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:19:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
19 | scanf("%d",&a);
| ~~~~~^~~~~~~~~
main.cpp:20:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
20 | scanf("%d",&b);
| ~~~~~^~~~~~~~~
ソースコード
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
int PockyGame(int x, int y)
{
for(int i=0;;i++){
if ( x <= 2*y*(i+1) ){
return y*i;
}
}
}
int main(void)
{
int a,b,c;
scanf("%d",&a);
scanf("%d",&b);
c = PockyGame(a,b);
printf("%d\n",c);
return 0;
}
jolly_gliscor