提出 #30059170


ソースコード 拡げる

#include<stdio.h>
int main(){
  int V,a,b,c;
  scanf("%d",&V);
   scanf("%d",&a);
   scanf("%d",&b);
   scanf("%d",&c);
  while(V>=0){
  V=V-a;
  if(V<0){
    printf("F");
    break;
  }
  V=V-b;
  if(V<0){
    printf("M");
  break;
  }
    V=V-c;
  if(V<0){
    printf("T");
  break;
  }
  }
  return 0;
}
    

提出情報

提出日時
問題 A - Shampoo
ユーザ TCSP
言語 C (GCC 9.2.1)
得点 100
コード長 337 Byte
結果 AC
実行時間 4 ms
メモリ 1656 KiB

コンパイルエラー

./Main.c: In function ‘main’:
./Main.c:4:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
    4 |   scanf("%d",&V);
      |   ^~~~~~~~~~~~~~
./Main.c:5:4: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
    5 |    scanf("%d",&a);
      |    ^~~~~~~~~~~~~~
./Main.c:6:4: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
    6 |    scanf("%d",&b);
      |    ^~~~~~~~~~~~~~
./Main.c:7:4: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
    7 |    scanf("%d",&c);
      |    ^~~~~~~~~~~~~~

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 3
AC × 11
セット名 テストケース
Sample sample_01.txt, sample_02.txt, sample_03.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, sample_01.txt, sample_02.txt, sample_03.txt
ケース名 結果 実行時間 メモリ
random_01.txt AC 4 ms 1588 KiB
random_02.txt AC 1 ms 1504 KiB
random_03.txt AC 1 ms 1604 KiB
random_04.txt AC 1 ms 1608 KiB
random_05.txt AC 1 ms 1608 KiB
random_06.txt AC 1 ms 1616 KiB
random_07.txt AC 1 ms 1508 KiB
random_08.txt AC 1 ms 1604 KiB
sample_01.txt AC 1 ms 1600 KiB
sample_02.txt AC 2 ms 1596 KiB
sample_03.txt AC 1 ms 1656 KiB