結果
問題 |
No.51 やる気の問題
|
ユーザー |
![]() |
提出日時 | 2014-10-28 23:50:32 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 216 bytes |
コンパイル時間 | 221 ms |
コンパイル使用メモリ | 22,656 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-30 14:28:39 |
合計ジャッジ時間 | 1,982 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 RE * 6 |
コンパイルメッセージ
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", &w, &d); | ~~~~~^~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> using namespace std; int main(){ int w, d; scanf("%d%d", &w, &d); int sagyo; for (int i = d; i > 0; i--){ sagyo = w / (i*i); w -= sagyo; } printf("%d\n", sagyo); return 0; }