結果
| 問題 |
No.51 やる気の問題
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-03-01 14:04:08 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 5,000 ms |
| コード長 | 188 bytes |
| コンパイル時間 | 305 ms |
| コンパイル使用メモリ | 20,608 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-12 05:06:31 |
| 合計ジャッジ時間 | 1,104 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:15:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
15 | scanf("%lld%lld",&W,&D);
| ^~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void)
{
long long int W,D,i,x=0;
scanf("%lld%lld",&W,&D);
for(i=D;i>=2;i--){
x = W/(i*i);
W = W-x;
}
printf("%lld\n",W);
return 0;
}