結果
| 問題 |
No.51 やる気の問題
|
| コンテスト | |
| ユーザー |
Haijinn
|
| 提出日時 | 2017-07-27 19:52:33 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 204 bytes |
| コンパイル時間 | 661 ms |
| コンパイル使用メモリ | 21,248 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-10 02:12:13 |
| 合計ジャッジ時間 | 1,743 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 RE * 6 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:18:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
18 | printf("%d\n",a);
| ~^ ~
| | |
| int long int
| %ld
main.c:10:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | scanf("%ld%d",&a,&b);
| ^~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#include<string.h>
int main(){
long a;
int b;
int c;
int x=0;
scanf("%ld%d",&a,&b);
while(b-1!=0){
c=a/(b*b);
a-=c;
b--;
c=0;
//printf("%d\n",a);
}
printf("%d\n",a);
return 0;
}
Haijinn