結果
問題 |
No.51 やる気の問題
|
ユーザー |
![]() |
提出日時 | 2017-07-27 19:58:02 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 4 ms / 5,000 ms |
コード長 | 202 bytes |
コンパイル時間 | 99 ms |
コンパイル使用メモリ | 21,120 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-10 02:12:16 |
合計ジャッジ時間 | 914 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
コンパイルメッセージ
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; }