結果
問題 |
No.542 1円玉と5円玉
|
ユーザー |
![]() |
提出日時 | 2017-07-14 23:05:49 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 384 bytes |
コンパイル時間 | 493 ms |
コンパイル使用メモリ | 20,096 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-07 23:28:00 |
合計ジャッジ時間 | 972 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | WA * 10 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:10:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%d%d",&a,&b); | ^~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> #include<string.h> #include<ctype.h> int main(){ int a,b; int i=0,j; int x=0; int z=0; int c=0; scanf("%d%d",&a,&b); for(i=1;i<=a;i++){ x++; printf("%d\n",x); } x=0; if(b>0){ printf("%d\n",5); z=5; c++; } for(i=c;i<=b;i++){ if(i>1){ z+=5; printf("%d\n",z); } for(j=1;j<=a;j++){ z++; printf("%d\n",z); } } return 0; }