結果
問題 |
No.51 やる気の問題
|
ユーザー |
![]() |
提出日時 | 2014-10-28 23:30:40 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 336 bytes |
コンパイル時間 | 336 ms |
コンパイル使用メモリ | 39,468 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-30 14:20:05 |
合計ジャッジ時間 | 2,205 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 RE * 6 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:11:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | scanf("%d%d",&w,&d);//%d%d%d%d",&n,&v,&x,&y,&ax,&ay); | ~~~~~^~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> #include <algorithm> using namespace std; //namaega 184 int main(){ int d,w; scanf("%d%d",&w,&d);//%d%d%d%d",&n,&v,&x,&y,&ax,&ay); int ans=0; while(d){ if(d==1)ans=w/(d*d); w=w-w/(d*d); d--; } printf("%d\n",ans); return 0; }