結果

問題 No.1423 Triangle of Multiples
ユーザー tsuishitsuishi
提出日時 2021-03-19 11:16:02
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 1,195 bytes
コンパイル時間 246 ms
コンパイル使用メモリ 30,300 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-11 07:34:57
合計ジャッジ時間 964 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// Yukicoder №1423 Triangle of Multiples ★☆
// https://yukicoder.me/problems/no/1423
// ***********************
#define gc(c)	do{c = getchar();}while(0)
#define GETLINE(str)	do{char *p;fgets(str,sizeof(str),stdin);p=strchr(str,'\n');if(p)*p='\0';}while(0)
static char *GETWORD(char* str) {char c;char *cp;cp=&str[0];gc(c);while(c!=EOF){if((c==' ')||(c=='\n'))break;*cp++=c;gc(c);}*cp='\0';return &str[0];}
static int GETLINEINT(void) {char s[34];GETLINE(s);return atoi(s);}
static int GETWORDINT(void) {char s[34];GETWORD(s);return atoi(s);}
static int maxi(int a,int b){if(a>b){return a;}return b;}
#define Yes(a)    printf("%s",((a)?"Yes":"No"))
// *********************
static int min(int a,int b){if(a<b){return a;}return b;}
static int mid(int a,int b,int c){if(a<b && c<a){return a;}else if(a<b  && b<c){return b;}else return c;}
#define REP(a,b) for(int a=0;a<(b);++a)
// *********************
int main( void ) {
	int	a,b,c;
	int q;

	q = GETLINEINT();
	REP(i,q) {
		a = GETWORDINT();
		b = GETWORDINT();
		c = GETWORDINT();
		printf("%d %d %d\n",a*maxi(b,c)%100000000,b*mid(a,b,c)%100000000,c*mid(a,b,c)%100000000);
	}
}

0