結果
問題 | No.207 世界のなんとか |
ユーザー |
![]() |
提出日時 | 2015-12-19 15:32:54 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 275 bytes |
コンパイル時間 | 405 ms |
コンパイル使用メモリ | 20,992 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-09 10:39:47 |
合計ジャッジ時間 | 1,118 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:4:9: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘long int *’ [-Wformat=] 4 | scanf("%d%d",&A,&B); | ~^ ~~ | | | | | long int * | int * | %ld main.c:4:11: warning: format ‘%d’ expects argument of type ‘int *’, but argument 3 has type ‘long int *’ [-Wformat=] 4 | scanf("%d%d",&A,&B); | ~^ ~~ | | | | int * long int * | %ld main.c:8:34: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=] 8 | printf("%d\n",i); | ~^ ~ | | | | int long int | %ld main.c:13:50: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=] 13 | printf("%d\n",i); | ~^ ~ | | | | int long int | %ld main.c:4:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 4 | scanf("%d%d",&A,&B); | ^~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> int main(void){ long A, B, i, j; scanf("%d%d",&A,&B); for ( i = A; i <= B; i++){ if( 0 == i % 3){ printf("%d\n",i); } else{ for( j = i; j > 1; j = j / 10){ if ( 3 ==j % 10){ printf("%d\n",i); break; } } } } return 0; }