結果
| 問題 |
No.51 やる気の問題
|
| コンテスト | |
| ユーザー |
sasa
|
| 提出日時 | 2025-03-05 11:54:10 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 281 bytes |
| コンパイル時間 | 714 ms |
| コンパイル使用メモリ | 27,008 KB |
| 実行使用メモリ | 8,608 KB |
| 最終ジャッジ日時 | 2025-03-05 11:54:13 |
| 合計ジャッジ時間 | 2,402 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | WA * 14 RE * 6 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%d %d",&work,&day);
| ~~~~~^~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
int work, day;
scanf("%d %d",&work,&day);
int motivation = 0;
while(day > 1){
motivation = work / (day * day);
printf("モチベいえーい%d 残り日数;%d\n",motivation,day);
work -= motivation;
day -= 1;
}
printf("%d",work);
}
sasa