結果
問題 | No.63 ポッキーゲーム |
ユーザー |
![]() |
提出日時 | 2017-06-11 12:25:29 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 166 bytes |
コンパイル時間 | 112 ms |
コンパイル使用メモリ | 22,528 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-24 05:32:12 |
合計ジャッジ時間 | 1,595 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 22 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:6:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d%d",&l,&k); | ~~~~~^~~~~~~~~~~~~~ main.cpp:13:18: warning: ‘c’ may be used uninitialized in this function [-Wmaybe-uninitialized] 13 | c+=k; | ~^~~
ソースコード
#include<stdio.h> int main() { int l,k,c,i; scanf("%d%d",&l,&k); while(1){ if((l-k*2)<=0){ break; } l-=k*2; c+=k; } printf("%d\n",c); return 0; }